home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ORBit.idb / usr / freeware / src / ORBit / patches.z / patches
Encoding:
Text File  |  1999-07-16  |  259.2 KB  |  7,660 lines

  1. --- ./src/orb/corba_object.c    Tue Jul  6 14:52:44 1999
  2. +++ ../ORBit-0.4.91/./src/orb/corba_object.c    Tue Jul  6 19:04:48 1999
  3. @@ -31,6 +31,11 @@
  4.  #include "orb.h"
  5.  #include "interface_repository.h"
  6.  
  7. +#include "config.h"
  8. +#ifdef HAVE_ALLOCA_H
  9. +#include <alloca.h>
  10. +#endif
  11. +
  12.  /* Section 4.2.1 */
  13.  CORBA_InterfaceDef CORBA_Object_get_interface(CORBA_Object obj, CORBA_Environment *ev)
  14.  {
  15. --- ./src/IIOP/iiop-endian.c    Fri Nov 27 14:19:08 1998
  16. +++ ../ORBit-0.4.91/./src/IIOP/iiop-endian.c    Tue Jul  6 18:20:09 1999
  17. @@ -1,5 +1,6 @@
  18.  #include "iiop-endian.h"
  19.  
  20. +#ifndef G_CAN_INLINE
  21.  void iiop_byteswap(guchar *outdata,
  22.             const guchar *data,
  23.             gulong datalen)
  24. @@ -9,3 +10,4 @@
  25.    while(dest_ptr >= outdata)
  26.      *dest_ptr-- = *source_ptr++;
  27.  }
  28. +#endif
  29. --- ./src/IIOP/connection.c    Fri Jun 18 14:27:41 1999
  30. +++ ../ORBit-0.4.91/./src/IIOP/connection.c    Tue Jul  6 18:20:26 1999
  31. @@ -1,6 +1,6 @@
  32.  #include "config.h"
  33.  #ifndef _XOPEN_SOURCE_EXTENDED
  34. -#   define _XOPEN_SOURCE_EXTENDED
  35. +#   define _XOPEN_SOURCE_EXTENDED 1
  36.  #   define WE_DEFINED_XOPEN_SOURCE_EXTENDED
  37.  #endif
  38.  #include "iiop-endianP.h"
  39. --- ./src/orbit-idl-compiler/Makefile.am    Thu Jun 10 15:07:58 1999
  40. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/Makefile.am    Tue Jul  6 18:36:19 1999
  41. @@ -15,9 +15,9 @@
  42.  orbit_idl_LDFLAGS = -static
  43.  orbit_idl_LDADD = \
  44.      $(top_builddir)/libIDL/libIDL.la \
  45. -    @GLIB_LIBS@ @GMODULE_LIBS@ \
  46.      $(top_builddir)/popt/libpopt.la \
  47.      backends/c/liborbit-c-backend.a \
  48. +    @GLIB_LIBS@ @GMODULE_LIBS@ \
  49.      -lm
  50.  
  51.  orbit_idl_SOURCES=orbit-idl-main.c \
  52. --- ./src/orbit-idl-compiler/Makefile.in    Tue Jul  6 15:53:16 1999
  53. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/Makefile.in    Tue Jul  6 18:36:37 1999
  54. @@ -104,7 +104,7 @@
  55.  orbit_idl_DEPENDENCIES = $(top_builddir)/libIDL/libIDL.la              $(top_builddir)/popt/libpopt.la              backends/c/liborbit-c-backend.a
  56.  
  57.  orbit_idl_LDFLAGS = -static
  58. -orbit_idl_LDADD =      $(top_builddir)/libIDL/libIDL.la     @GLIB_LIBS@ @GMODULE_LIBS@     $(top_builddir)/popt/libpopt.la     backends/c/liborbit-c-backend.a     -lm
  59. +orbit_idl_LDADD =      $(top_builddir)/libIDL/libIDL.la     $(top_builddir)/popt/libpopt.la     backends/c/liborbit-c-backend.a     @GLIB_LIBS@ @GMODULE_LIBS@     -lm
  60.  
  61.  
  62.  orbit_idl_SOURCES = orbit-idl-main.c            orbit-idl-driver.c            orbit-idl-backends.c            orbit-idl-passes.c            orbit-idl-genmarshal.c            orbit-idl-utils.c               orbit-idl2.h
  63. --- ./src/orbit-idl-compiler/orbit-idl-backends.c    Tue May 25 18:31:55 1999
  64. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/orbit-idl-backends.c    Tue Jul  6 18:22:21 1999
  65. @@ -27,6 +27,11 @@
  66.  #include <dirent.h>
  67.  #include <gmodule.h>
  68.  
  69. +#include "config.h"
  70. +#ifdef HAVE_ALLOCA_H
  71. +#include <alloca.h>
  72. +#endif
  73. +
  74.  static OIDL_Backend_Info orbit_idl_builtin_backends[] = {
  75.    {"c", &orbit_idl_output_c},
  76.    {NULL, NULL}
  77. --- ./src/orbit-idl-compiler/backends/c/orbit-idl-c-headers.c    Tue Jul  6 15:25:12 1999
  78. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/backends/c/orbit-idl-c-headers.c    Tue Jul  6 18:25:00 1999
  79. @@ -62,7 +62,7 @@
  80.  
  81.        fprintf(ci->fh, "%s", IDL_IDENT(IDL_TYPE_ARRAY(name).ident).str);
  82.        for(curitem = IDL_TYPE_ARRAY(name).size_list; curitem; curitem = IDL_LIST(curitem).next) {
  83. -    fprintf(ci->fh, "[%qd]", IDL_INTEGER(IDL_LIST(curitem).data).value);
  84. +    fprintf(ci->fh, "[%lld]", IDL_INTEGER(IDL_LIST(curitem).data).value);
  85.        }
  86.      }
  87.      break;
  88. @@ -199,6 +199,7 @@
  89.  static void
  90.  ch_output_type_struct(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
  91.  {
  92. +  int fields;
  93.    char *id;
  94.    IDL_tree cur, curmem;
  95.  
  96. @@ -215,11 +216,15 @@
  97.    fprintf(ci->fh, "#if !defined(_%s_defined)\n#define _%s_defined 1\n", id, id);
  98.    fprintf(ci->fh, "typedef struct {\n");
  99.  
  100. +  fields = 0;
  101.    for(cur = IDL_TYPE_STRUCT(tree).member_list; cur; cur = IDL_LIST(cur).next) {
  102.      for(curmem = IDL_MEMBER(IDL_LIST(cur).data).dcls; curmem; curmem = IDL_LIST(curmem).next) {
  103.        ch_output_var(IDL_MEMBER(IDL_LIST(cur).data).type_spec, IDL_LIST(curmem).data, ci);
  104. +      fields++;
  105.      }
  106.    }
  107. +  if (fields == 0)
  108. +    fprintf(ci->fh, "      char _dummy_to_force_nonempty_struct;\n");
  109.    fprintf(ci->fh, "} %s;\n\n", id);
  110.  
  111.    ch_type_alloc_and_tc(tree, ci, TRUE);
  112. @@ -265,13 +270,13 @@
  113.        {
  114.      fprintf(ci->fh, " %s", ctmp);
  115.      for(sub = IDL_TYPE_ARRAY(ent).size_list; sub; sub = IDL_LIST(sub).next)
  116. -      fprintf(ci->fh, "[%qd]", IDL_INTEGER(IDL_LIST(sub).data).value);
  117. +      fprintf(ci->fh, "[%lld]", IDL_INTEGER(IDL_LIST(sub).data).value);
  118.      fprintf(ci->fh, ";\n");
  119.      fprintf(ci->fh, "typedef ");
  120.      orbit_cbe_write_typespec(ci->fh, IDL_TYPE_DCL(tree).type_spec);
  121.      fprintf(ci->fh, " %s_slice", ctmp);
  122.      for(sub = IDL_LIST(IDL_TYPE_ARRAY(ent).size_list).next; sub; sub = IDL_LIST(sub).next)
  123. -      fprintf(ci->fh, "[%qd]", IDL_INTEGER(IDL_LIST(sub).data).value);
  124. +      fprintf(ci->fh, "[%lld]", IDL_INTEGER(IDL_LIST(sub).data).value);
  125.      fprintf(ci->fh, ";\n");
  126.        }
  127.        break;
  128. --- ./src/orbit-idl-compiler/backends/c/orbit-idl-c-stubs.c    Fri Jun 25 12:18:30 1999
  129. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/backends/c/orbit-idl-c-stubs.c    Tue Jul  6 18:25:27 1999
  130. @@ -13,6 +13,9 @@
  131.               " * This file was generated by orbit-idl - DO NOT EDIT!\n"
  132.             " */\n\n");
  133.    fprintf(ci->fh, "#include <string.h>\n");
  134. +#ifdef HAVE_ALLOCA_H
  135. +  fprintf(ci->fh, "#include <alloca.h>\n");
  136. +#endif
  137.    fprintf(ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
  138.  
  139.    cs_output_stubs(tree->tree, ci);
  140. --- ./src/orbit-idl-compiler/backends/c/orbit-idl-c-skels.c    Thu Jun 10 12:20:00 1999
  141. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/backends/c/orbit-idl-c-skels.c    Tue Jul  6 18:25:45 1999
  142. @@ -24,6 +24,9 @@
  143.               " * This file was generated by orbit-idl - DO NOT EDIT!\n"
  144.             " */\n\n");
  145.    fprintf(ci->fh, "#include <string.h>\n");
  146. +#ifdef HAVE_ALLOCA_H
  147. +  fprintf(ci->fh, "#include <alloca.h>\n");
  148. +#endif
  149.    fprintf(ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
  150.  
  151.    ck_output_skels(tree->tree, ci);
  152. --- ./src/orbit-idl-compiler/backends/c/orbit-idl-c-utils.c    Wed Jun  9 19:32:52 1999
  153. +++ ../ORBit-0.4.91/./src/orbit-idl-compiler/backends/c/orbit-idl-c-utils.c    Tue Jul  6 18:26:09 1999
  154. @@ -30,7 +30,7 @@
  155.      fprintf(of, "CORBA_boolean");
  156.      break;
  157.    case IDLN_TYPE_FIXED:
  158. -    fprintf(of, "CORBA_fixed_%qd_%qd",
  159. +    fprintf(of, "CORBA_fixed_%lld_%lld",
  160.          IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value,
  161.          IDL_INTEGER(IDL_TYPE_FIXED(tree).integer_lit).value);
  162.      break;
  163. @@ -153,7 +153,7 @@
  164.      }
  165.      break;
  166.    case IDLN_TYPE_FIXED:
  167. -    g_string_sprintf(tmpstr, "CORBA_fixed_%qd_%qd",
  168. +    g_string_sprintf(tmpstr, "CORBA_fixed_%lld_%lld",
  169.               IDL_INTEGER(IDL_TYPE_FIXED(tree).positive_int_const).value,
  170.               IDL_INTEGER(IDL_TYPE_FIXED(tree).integer_lit).value);
  171.      break;
  172. --- ./popt/ltmain.sh    Tue Jul  6 10:33:53 1999
  173. +++ ../ORBit-0.4.91/./popt/ltmain.sh    Tue Jul  6 18:28:41 1999
  174. @@ -2,7 +2,7 @@
  175.  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  176.  #
  177.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  178. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  179. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  180.  #
  181.  # This program is free software; you can redistribute it and/or modify
  182.  # it under the terms of the GNU General Public License as published by
  183. @@ -28,12 +28,8 @@
  184.    # Discard the --no-reexec flag, and continue.
  185.    shift
  186.  elif test "X$1" = X--fallback-echo; then
  187. -  # used as fallback echo
  188. -  shift
  189. -  cat <<EOF
  190. -$*
  191. -EOF
  192. -  exit 0
  193. +  # Avoid inline document here, it may be left over
  194. +  :
  195.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  196.    # Yippee, $echo works!
  197.    :
  198. @@ -42,6 +38,15 @@
  199.    exec $SHELL "$0" --no-reexec ${1+"$@"}
  200.  fi
  201.  
  202. +if test "X$1" = X--fallback-echo; then
  203. +  # used as fallback echo
  204. +  shift
  205. +  cat <<EOF
  206. +$*
  207. +EOF
  208. +  exit 0
  209. +fi
  210. +
  211.  # The name of this program.
  212.  progname=`$echo "$0" | sed 's%^.*/%%'`
  213.  modename="$progname"
  214. @@ -49,8 +54,8 @@
  215.  # Constants.
  216.  PROGRAM=ltmain.sh
  217.  PACKAGE=libtool
  218. -VERSION=1.2f
  219. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  220. +VERSION=1.3.2
  221. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  222.  
  223.  default_mode=
  224.  help="Try \`$progname --help' for more information."
  225. @@ -100,6 +105,7 @@
  226.  show_help=
  227.  execute_dlfiles=
  228.  lo2o="s/\\.lo\$/.${objext}/"
  229. +o2lo="s/\\.${objext}\$/.lo/"
  230.  
  231.  # Parse our command line options once, thoroughly.
  232.  while test $# -gt 0
  233. @@ -460,6 +466,7 @@
  234.      command="$command -o $output_obj"
  235.        fi
  236.  
  237. +      $run $rm "$output_obj"
  238.        $show "$command"
  239.        if $run eval "$command"; then :
  240.        else
  241. @@ -539,6 +546,7 @@
  242.  
  243.        # Suppress compiler output if we already did a PIC compilation.
  244.        command="$command$suppress_output"
  245. +      $run $rm "$output_obj"
  246.        $show "$command"
  247.        if $run eval "$command"; then :
  248.        else
  249. @@ -630,7 +638,13 @@
  250.  # #undef WIN32_LEAN_AND_MEAN
  251.  # #include <stdio.h>
  252.  #
  253. +# #ifdef __cplusplus
  254. +# extern "C" {
  255. +# #endif
  256.  # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  257. +# #ifdef __cplusplus
  258. +# }
  259. +# #endif
  260.  #
  261.  # #include <cygwin/cygwin_dll.h>
  262.  # DECLARE_CYGWIN_DLL( DllMain );
  263. @@ -815,6 +829,7 @@
  264.      ltlibs=
  265.      module=no
  266.      objs=
  267. +    prefer_static_libs=no
  268.      preload=no
  269.      prev=
  270.      prevarg=
  271. @@ -831,11 +846,21 @@
  272.      do
  273.        case "$arg" in
  274.        -all-static | -static)
  275. -    if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  276. +    if test "X$arg" = "X-all-static"; then
  277. +      if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  278.          $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  279. +      fi
  280. +      if test -n "$link_static_flag"; then
  281. +        dlopen_self=$dlopen_self_static
  282. +      fi
  283. +    else
  284. +      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  285. +        dlopen_self=$dlopen_self_static
  286. +      fi
  287.      fi
  288.      build_libtool_libs=no
  289.      build_old_libs=yes
  290. +    prefer_static_libs=yes
  291.      break
  292.      ;;
  293.        esac
  294. @@ -873,13 +898,19 @@
  295.            dlself=yes
  296.          elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  297.            dlself=yes
  298. +        else
  299. +          dlself=needless
  300. +          export_dynamic=yes
  301.          fi
  302.          prev=
  303.          continue
  304.          ;;
  305.        *)
  306. -        dlprefiles="$dlprefiles $arg"
  307. -        test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
  308. +        if test "$prev" = dlfiles; then
  309. +          dlfiles="$dlfiles $arg"
  310. +        else
  311. +          dlprefiles="$dlprefiles $arg"
  312. +        fi
  313.          prev=
  314.          ;;
  315.        esac
  316. @@ -903,13 +934,26 @@
  317.        prev=
  318.        continue
  319.        ;;
  320. -    rpath)
  321. -      rpath="$rpath $arg"
  322. -      prev=
  323. -      continue
  324. -      ;;
  325. -    xrpath)
  326. -      xrpath="$xrpath $arg"
  327. +    rpath | xrpath)
  328. +      # We need an absolute path.
  329. +      case "$arg" in
  330. +      [\\/]* | [A-Za-z]:[\\/]*) ;;
  331. +      *)
  332. +        $echo "$modename: only absolute run-paths are allowed" 1>&2
  333. +        exit 1
  334. +        ;;
  335. +      esac
  336. +      if test "$prev" = rpath; then
  337. +        case "$rpath " in
  338. +        *" $arg "*) ;;
  339. +        *) rpath="$rpath $arg" ;;
  340. +        esac
  341. +      else
  342. +        case "$xrpath " in
  343. +        *" $arg "*) ;;
  344. +        *) xrpath="$xrpath $arg" ;;
  345. +        esac
  346. +      fi
  347.        prev=
  348.        continue
  349.        ;;
  350. @@ -928,7 +972,6 @@
  351.      if test -n "$link_static_flag"; then
  352.        compile_command="$compile_command $link_static_flag"
  353.        finalize_command="$finalize_command $link_static_flag"
  354. -      dlopen_self=$dlopen_self_static
  355.      fi
  356.      continue
  357.      ;;
  358. @@ -955,22 +998,16 @@
  359.      ;;
  360.  
  361.        -export-dynamic)
  362. -    if test "$export_dynamic" != yes; then
  363. -      export_dynamic=yes
  364. -      if test -n "$export_dynamic_flag_spec"; then
  365. -        eval arg=\"$export_dynamic_flag_spec\"
  366. -      else
  367. -        arg=
  368. -      fi
  369. -    fi
  370. +    export_dynamic=yes
  371. +    continue
  372.      ;;
  373.  
  374.        -export-symbols | -export-symbols-regex)
  375.      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  376. -      $echo "$modename: cannot have more than one -exported-symbols"
  377. +      $echo "$modename: not more than one -exported-symbols argument allowed"
  378.        exit 1
  379.      fi
  380. -    if test "$arg" = "-export-symbols"; then
  381. +    if test "X$arg" = "X-export-symbols"; then
  382.        prev=expsyms
  383.      else
  384.        prev=expsyms_regex
  385. @@ -979,14 +1016,18 @@
  386.      ;;
  387.  
  388.        -L*)
  389. -    dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
  390. +    dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  391. +    # We need an absolute path.
  392.      case "$dir" in
  393. -    /* | [A-Za-z]:[/\\]*)
  394. -      # Add the corresponding hardcode_libdir_flag, if it is not identical.
  395. -      ;;
  396. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  397.      *)
  398. -      $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
  399. -      exit 1
  400. +      absdir=`cd "$dir" && pwd`
  401. +      if test -z "$absdir"; then
  402. +        $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  403. +        $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  404. +        absdir="$dir"
  405. +      fi
  406. +      dir="$absdir"
  407.        ;;
  408.      esac
  409.      case " $deplibs " in
  410. @@ -1010,20 +1051,29 @@
  411.      ;;
  412.  
  413.        -l*)
  414. +    if test "$arg" = "-lc"; then
  415. +      case "$host" in
  416. +      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  417. +        # These systems don't actually have c library (as such)
  418. +        continue
  419. +        ;;
  420. +      esac
  421. +    elif test "$arg" = "-lm"; then
  422. +      case "$host" in
  423. +      *-*-cygwin* | *-*-beos*)
  424. +        # These systems don't actually have math library (as such)
  425. +        continue
  426. +        ;;
  427. +      esac
  428. +    fi
  429.      deplibs="$deplibs $arg"
  430.      ;;
  431.  
  432.        -module)
  433. -    if test "$module" != yes; then
  434. -      module=yes
  435. -      if test -n "$export_dynamic_flag_spec"; then
  436. -        eval arg=\"$export_dynamic_flag_spec\"
  437. -      else
  438. -        arg=
  439. -      fi
  440. -    fi
  441. +    module=yes
  442. +    continue
  443.      ;;
  444. -    
  445. +
  446.        -no-undefined)
  447.      allow_undefined=no
  448.      continue
  449. @@ -1047,7 +1097,19 @@
  450.      ;;
  451.  
  452.        -R*)
  453. -    xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
  454. +    dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  455. +    # We need an absolute path.
  456. +    case "$dir" in
  457. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  458. +    *)
  459. +      $echo "$modename: only absolute run-paths are allowed" 1>&2
  460. +      exit 1
  461. +      ;;
  462. +    esac
  463. +    case "$xrpath " in
  464. +    *" $dir "*) ;;
  465. +    *) xrpath="$xrpath $dir" ;;
  466. +    esac
  467.      continue
  468.      ;;
  469.  
  470. @@ -1056,7 +1118,6 @@
  471.      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  472.        compile_command="$compile_command $link_static_flag"
  473.        finalize_command="$finalize_command $link_static_flag"
  474. -      dlopen_self=$dlopen_self_static
  475.      fi
  476.      continue
  477.      ;;
  478. @@ -1128,6 +1189,7 @@
  479.      # it will not redefine variable installed.
  480.      installed=yes
  481.  
  482. +    # Read the .la file
  483.      # If there is no directory component, then add one.
  484.      case "$arg" in
  485.      */* | *\\*) . $arg ;;
  486. @@ -1218,7 +1280,8 @@
  487.        prev=
  488.      fi
  489.  
  490. -    if test "$build_libtool_libs" = yes && test -n "$library_names"; then
  491. +    if test -n "$library_names" &&
  492. +       { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  493.        link_against_libtool_libs="$link_against_libtool_libs $arg"
  494.        if test -n "$shlibpath_var"; then
  495.          # Make sure the rpath contains only unique directories.
  496. @@ -1230,12 +1293,13 @@
  497.  
  498.        # We need an absolute path.
  499.        case "$dir" in
  500. -      /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
  501. +      [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  502.        *)
  503.          absdir=`cd "$dir" && pwd`
  504.          if test -z "$absdir"; then
  505. -          $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
  506. -          exit 1
  507. +          $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  508. +          $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  509. +          absdir="$dir"
  510.          fi
  511.          ;;
  512.        esac
  513. @@ -1244,7 +1308,7 @@
  514.        # Skip directories that are in the system default run-time
  515.        # search path, unless they have been requested with -R.
  516.        case " $sys_lib_dlsearch_path " in
  517. -       *" $absdir "*) ;;
  518. +      *" $absdir "*) ;;
  519.        *)
  520.          case "$compile_rpath " in
  521.          *" $absdir "*) ;;
  522. @@ -1251,10 +1315,10 @@
  523.          *) compile_rpath="$compile_rpath $absdir" 
  524.          esac
  525.          ;;
  526. -       esac
  527. +      esac
  528.  
  529.        case " $sys_lib_dlsearch_path " in
  530. -       *" $libdir "*) ;;
  531. +      *" $libdir "*) ;;
  532.        *)
  533.          case "$finalize_rpath " in
  534.          *" $libdir "*) ;;
  535. @@ -1261,7 +1325,7 @@
  536.          *) finalize_rpath="$finalize_rpath $libdir"
  537.          esac
  538.          ;;
  539. -       esac
  540. +      esac
  541.  
  542.        lib_linked=yes
  543.        case "$hardcode_action" in
  544. @@ -1419,6 +1483,12 @@
  545.        exit 1
  546.      fi
  547.  
  548. +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  549. +      eval arg=\"$export_dynamic_flag_spec\"
  550. +      compile_command="$compile_command $arg"
  551. +      finalize_command="$finalize_command $arg"
  552. +    fi
  553. +
  554.      oldlibs=
  555.      # calculate the name of the file, without its directory
  556.      outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  557. @@ -1441,7 +1511,7 @@
  558.      $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  559.        fi
  560.  
  561. -      if test -n "$dlfiles$dlprefiles"; then
  562. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  563.      $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  564.        fi
  565.  
  566. @@ -1461,7 +1531,7 @@
  567.      $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  568.        fi
  569.  
  570. -      if test -n "$export_symbols"; then
  571. +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  572.      $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  573.        fi
  574.  
  575. @@ -1500,11 +1570,6 @@
  576.      output_objdir="$output_objdir/$objdir"
  577.        fi
  578.  
  579. -      # All the library-specific variables (install_libdir is set above).
  580. -      library_names=
  581. -      old_library=
  582. -      dlname=
  583. -
  584.        if test -n "$objs"; then
  585.      $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
  586.      exit 1
  587. @@ -1516,7 +1581,7 @@
  588.       exit 1
  589.        fi
  590.  
  591. -      if test -n "$dlfiles$dlprefiles"; then
  592. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  593.      $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
  594.        fi
  595.  
  596. @@ -1699,7 +1764,7 @@
  597.  
  598.      dependency_libs="$deplibs"
  599.      case "$host" in
  600. -    *-*-cygwin* | *-*-mingw* | *-*-os2*)
  601. +    *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  602.        # these systems don't actually have a c library (as such)!
  603.        ;;
  604.      *)
  605. @@ -1747,12 +1812,13 @@
  606.      droppeddeps=no
  607.      case "$deplibs_check_method" in
  608.      pass_all)
  609. +      # Don't check for shared/static.  Everything works.
  610. +      # This might be a little naive.  We might want to check
  611. +      # whether the library exists or not.  But this is on
  612. +      # osf3 & osf4 and I'm not really sure... Just
  613. +      # implementing what was already the behaviour.
  614.        newdeplibs=$deplibs
  615. -            ;; # Don't check for shared/static.  Everything works.
  616. -               # This might be a little naive.  We might want to check
  617. -               # whether the library exists or not.  But this is on
  618. -               # osf3 & osf4 and I'm not really sure... Just
  619. -               # implementing what was already the behaviour.
  620. +      ;;
  621.      test_compile)
  622.        # This code stresses the "libraries are programs" paradigm to its
  623.        # limits. Maybe even breaks it.  We compile a program, linking it
  624. @@ -1800,20 +1866,20 @@
  625.          # Did it work?
  626.          if test $? -eq 0 ; then
  627.            ldd_output=`ldd conftest`
  628. -            libname=`eval \\$echo \"$libname_spec\"`
  629. -            deplib_matches=`eval \\$echo \"$library_names_spec\"`
  630. -            set dummy $deplib_matches
  631. -            deplib_match=$2
  632. -            if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  633. -              newdeplibs="$newdeplibs $i"
  634. -            else
  635. -              droppeddeps=yes
  636. -              echo
  637. -              echo "*** Warning: This library needs some functionality provided by $i."
  638. -              echo "*** I have the capability to make that library automatically link in when"
  639. -              echo "*** you link to this library.  But I can only do this if you have a"
  640. -              echo "*** shared version of the library, which you do not appear to have."
  641. -            fi
  642. +          libname=`eval \\$echo \"$libname_spec\"`
  643. +          deplib_matches=`eval \\$echo \"$library_names_spec\"`
  644. +          set dummy $deplib_matches
  645. +          deplib_match=$2
  646. +          if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  647. +            newdeplibs="$newdeplibs $i"
  648. +          else
  649. +            droppeddeps=yes
  650. +            echo
  651. +            echo "*** Warning: This library needs some functionality provided by $i."
  652. +            echo "*** I have the capability to make that library automatically link in when"
  653. +            echo "*** you link to this library.  But I can only do this if you have a"
  654. +            echo "*** shared version of the library, which you do not appear to have."
  655. +          fi
  656.          else
  657.            droppeddeps=yes
  658.            echo
  659. @@ -1827,7 +1893,6 @@
  660.            fi
  661.          done
  662.        fi
  663. -      deplibs=$newdeplibs
  664.        ;;
  665.      file_magic*)
  666.        set dummy $deplibs_check_method
  667. @@ -1841,7 +1906,7 @@
  668.              potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  669.              for potent_lib in $potential_libs; do
  670.                # Follow soft links.
  671. -              if ls -lLd "$potlib" 2>/dev/null \
  672. +              if ls -lLd "$potent_lib" 2>/dev/null \
  673.               | grep " -> " >/dev/null; then
  674.              continue 
  675.                fi
  676. @@ -1854,11 +1919,11 @@
  677.                while test -h "$potlib" 2>/dev/null; do
  678.              potliblink=`ls -ld $potlib | sed 's/.* -> //'`
  679.              case "$potliblink" in
  680. -            /*) potlib="$potliblink";;
  681. +            [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  682.              *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  683.              esac
  684.                done
  685. -              if eval $file_magic_cmd \"\$potlib\" \
  686. +              if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  687.               | sed 10q \
  688.               | egrep "$file_magic_regex" > /dev/null; then
  689.              newdeplibs="$newdeplibs $a_deplib"
  690. @@ -1881,7 +1946,8 @@
  691.          fi
  692.        done # Gone through all deplibs.
  693.        ;;
  694. -    none | unknown | *) newdeplibs=""
  695. +    none | unknown | *)
  696. +      newdeplibs=""
  697.        if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  698.             -e 's/ -[LR][^ ]*//g' -e 's/[     ]//g' |
  699.           grep . >/dev/null; then
  700. @@ -1923,8 +1989,6 @@
  701.          else
  702.            build_libtool_libs=no
  703.          fi
  704. -        dlname=
  705. -        library_names=
  706.        else
  707.          echo "*** The inter-library dependencies that have been dropped here will be"
  708.          echo "*** automatically added whenever a program is linked with this library"
  709. @@ -1931,13 +1995,17 @@
  710.          echo "*** or is declared to -dlopen it."
  711.        fi
  712.      fi
  713. +    # Done checking deplibs!
  714. +    deplibs=$newdeplibs
  715.        fi
  716.  
  717. -      # test again, we may have decided not to build it any more
  718. +      # All the library-specific variables (install_libdir is set above).
  719. +      library_names=
  720. +      old_library=
  721. +      dlname=
  722. +      
  723. +      # Test again, we may have decided not to build it any more
  724.        if test "$build_libtool_libs" = yes; then
  725. -    deplibs=$newdeplibs
  726. -    # Done checking deplibs!
  727.      # Get the real and link names of the library.
  728.      eval library_names=\"$library_names_spec\"
  729.      set dummy $library_names
  730. @@ -1960,7 +2028,10 @@
  731.      # (e.g. aix) incase we are running --disable-static
  732.      for obj in $libobjs; do
  733.        oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
  734. -      test -f $oldobj || ${LN_S} $obj $oldobj
  735. +      if test ! -f $oldobj; then
  736. +        $show "${LN_S} $obj $oldobj"
  737. +        $run ${LN_S} $obj $oldobj || exit $?
  738. +      fi
  739.      done
  740.  
  741.      # Use standard objects if they are pic
  742. @@ -1971,11 +2042,25 @@
  743.          eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  744.        fi
  745.      else
  746. +      gentop="$output_objdir/${outputname}x"
  747. +      $show "${rm}r $gentop"
  748. +      $run ${rm}r "$gentop"
  749. +      $show "mkdir $gentop"
  750. +      $run mkdir "$gentop"
  751. +      status=$?
  752. +      if test $status -ne 0 && test ! -d "$gentop"; then
  753. +        exit $status
  754. +      fi
  755. +      generated="$generated $gentop"
  756. +      
  757.        for xlib in $convenience; do
  758.          # Extract the objects.
  759. -        xdir="$xlib"x
  760. -        generated="$generated $xdir"
  761. +        case "$xlib" in
  762. +        [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  763. +        *) xabs=`pwd`"/$xlib" ;;
  764. +        esac
  765.          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  766. +        xdir="$gentop/$xlib"
  767.  
  768.          $show "${rm}r $xdir"
  769.          $run ${rm}r "$xdir"
  770. @@ -1985,8 +2070,8 @@
  771.          if test $status -ne 0 && test ! -d "$xdir"; then
  772.            exit $status
  773.          fi
  774. -        $show "(cd $xdir && $AR x ../$xlib)"
  775. -        $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  776. +        $show "(cd $xdir && $AR x $xabs)"
  777. +        $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  778.  
  779.          libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  780.        done
  781. @@ -1994,7 +2079,6 @@
  782.  
  783.      if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  784.        eval flag=\"$thread_safe_flag_spec\"
  785. -
  786.        linkopts="$linkopts $flag"
  787.      fi
  788.  
  789. @@ -2002,7 +2086,7 @@
  790.      if test -z "$export_symbols"; then
  791.        if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  792.          $show "generating symbol list for \`$libname.la'"
  793. -        export_symbols="$objdir/$libname.exp"
  794. +        export_symbols="$output_objdir/$libname.exp"
  795.          $run $rm $export_symbols
  796.          eval cmds=\"$export_symbols_cmds\"
  797.          IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  798. @@ -2065,7 +2149,7 @@
  799.      $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  800.        fi
  801.  
  802. -      if test -n "$dlfiles$dlprefiles"; then
  803. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  804.      $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  805.        fi
  806.  
  807. @@ -2167,11 +2251,6 @@
  808.      fi 
  809.        fi
  810.      
  811. -      if test "$dlself" = yes && test "$export_dynamic" = no; then
  812. -    $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
  813. -    exit 1
  814. -      fi
  815. -
  816.        if test -n "$rpath$xrpath"; then
  817.      # If the user specified any rpath flags, then add them.
  818.      for libdir in $rpath $xrpath; do
  819. @@ -2207,7 +2286,6 @@
  820.          fi
  821.        else
  822.          eval flag=\"$hardcode_libdir_flag_spec\"
  823. -
  824.          rpath="$rpath $flag"
  825.        fi
  826.      elif test -n "$runpath_var"; then
  827. @@ -2244,7 +2322,6 @@
  828.          fi
  829.        else
  830.          eval flag=\"$hardcode_libdir_flag_spec\"
  831. -
  832.          rpath="$rpath $flag"
  833.        fi
  834.      elif test -n "$runpath_var"; then
  835. @@ -2269,6 +2346,16 @@
  836.      output_objdir="$output_objdir/$objdir"
  837.        fi
  838.  
  839. +      # Create the binary in the object directory, then wrap it.
  840. +      if test ! -d $output_objdir; then
  841. +    $show "$mkdir $output_objdir"
  842. +    $run $mkdir $output_objdir
  843. +    status=$?
  844. +    if test $status -ne 0 && test ! -d $output_objdir; then
  845. +      exit $status
  846. +    fi
  847. +      fi
  848. +
  849.        if test -n "$libobjs" && test "$build_old_libs" = yes; then
  850.      # Transform all the library objects into standard objects.
  851.      compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  852. @@ -2289,24 +2376,15 @@
  853.      "") ;;
  854.      *.c)
  855.        # Discover the nlist of each of the dlfiles.
  856. -      nlist="$objdir/${output}.nm"
  857. +      nlist="$output_objdir/${outputname}.nm"
  858.  
  859. -      if test -d $objdir; then
  860. -        $show "$rm $nlist ${nlist}S ${nlist}T"
  861. -        $run $rm "$nlist" "${nlist}S" "${nlist}T"
  862. -      else
  863. -        $show "$mkdir $objdir"
  864. -        $run $mkdir $objdir
  865. -        status=$?
  866. -        if test $status -ne 0 && test ! -d $objdir; then
  867. -          exit $status
  868. -        fi
  869. -      fi
  870. +      $show "$rm $nlist ${nlist}S ${nlist}T"
  871. +      $run $rm "$nlist" "${nlist}S" "${nlist}T"
  872.  
  873.        # Parse the name list into a source file.
  874. -      $show "creating $objdir/$dlsyms"
  875. +      $show "creating $output_objdir/$dlsyms"
  876.  
  877. -      $echo > "$objdir/$dlsyms" "\
  878. +      test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  879.  /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  880.  /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  881.  
  882. @@ -2323,7 +2401,7 @@
  883.        if test "$dlself" = yes; then
  884.          $show "generating symbol list for \`$output'"
  885.  
  886. -        echo ': @PROGRAM@ ' > "$nlist"
  887. +        test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  888.  
  889.          # Add our own program objects to the symbol list.
  890.          progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  891. @@ -2344,13 +2422,12 @@
  892.  
  893.          # Prepare the list of exported symbols
  894.          if test -z "$export_symbols"; then
  895. -          export_symbols="$objdir/$output.exp"
  896. +          export_symbols="$output_objdir/$output.exp"
  897.            $run $rm $export_symbols
  898.            $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  899.          else
  900. -          $run $rm $export_symbols
  901. -          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
  902. -          $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
  903. +          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  904. +          $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  905.            $run eval 'mv "$nlist"T "$nlist"'
  906.          fi
  907.        fi
  908. @@ -2426,7 +2503,7 @@
  909.        fi
  910.  
  911.        pic_flag_for_symtable=
  912. -          case "$host" in
  913. +      case "$host" in
  914.        # compiling the symbol table file with pic_flag works around
  915.        # a FreeBSD bug that causes programs to crash when -lm is
  916.        # linked before any other PIC object.  But we must not use
  917. @@ -2440,12 +2517,16 @@
  918.        esac
  919.  
  920.        # Now compile the dynamic symbol file.
  921. -      $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  922. -      $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  923. +      $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  924. +      $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  925. +
  926. +      # Clean up the generated files.
  927. +      $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  928. +      $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  929.  
  930.        # Transform the symbol file into the correct name.
  931. -      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  932. -      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  933. +      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  934. +      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  935.        ;;
  936.      *)
  937.        $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  938. @@ -2470,7 +2551,15 @@
  939.      # We have no uninstalled library dependencies, so finalize right now.
  940.      $show "$link_command"
  941.      $run eval "$link_command"
  942. -    exit $?
  943. +    status=$?
  944. +    
  945. +    # Delete the generated files.
  946. +    if test -n "$dlsyms"; then
  947. +      $show "$rm $output_objdir/${outputname}S.${objext}"
  948. +      $run $rm "$output_objdir/${outputname}S.${objext}"
  949. +    fi
  950. +
  951. +    exit $status
  952.        fi
  953.  
  954.        if test -n "$shlibpath_var"; then
  955. @@ -2478,7 +2567,7 @@
  956.      rpath=
  957.      for dir in $temp_rpath; do
  958.        case "$dir" in
  959. -      /* | [A-Za-z]:[/\\]*)
  960. +      [\\/]* | [A-Za-z]:[\\/]*)
  961.          # Absolute path.
  962.          rpath="$rpath$dir:"
  963.          ;;
  964. @@ -2524,7 +2613,6 @@
  965.      link_command="$compile_var$compile_command$compile_rpath"
  966.      relink_command="$finalize_var$finalize_command$finalize_rpath"
  967.      
  968. -    # AGH! Flame the AIX and HP-UX people for me, will ya?
  969.      $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  970.      $echo "$modename: \`$output' will be relinked during installation" 1>&2
  971.        else
  972. @@ -2545,17 +2633,7 @@
  973.        # Replace the output file specification.
  974.        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  975.        
  976. -      # Create the binary in the object directory, then wrap it.
  977. -      if test ! -d $output_objdir; then
  978. -    $show "$mkdir $output_objdir"
  979. -    $run $mkdir $output_objdir
  980. -    status=$?
  981. -    if test $status -ne 0 && test ! -d $objdir; then
  982. -      exit $status
  983. -    fi
  984. -      fi
  985. -
  986. -      # Delete the old output file.
  987. +      # Delete the old output files.
  988.        $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  989.  
  990.        $show "$link_command"
  991. @@ -2572,7 +2650,7 @@
  992.        # Quote $echo for shipping.
  993.        if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  994.      case "$0" in
  995. -    /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
  996. +    [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  997.      *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
  998.      esac
  999.      qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  1000. @@ -2649,7 +2727,7 @@
  1001.      # If there was a directory component, then change thisdir.
  1002.      if test \"x\$destdir\" != \"x\$file\"; then
  1003.        case \"\$destdir\" in
  1004. -      /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
  1005. +      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
  1006.        *) thisdir=\"\$thisdir/\$destdir\" ;;
  1007.        esac
  1008.      fi
  1009. @@ -2787,31 +2865,58 @@
  1010.      addlibs="$old_convenience"
  1011.        fi
  1012.  
  1013. -      # Add in members from convenience archives.
  1014. -      for xlib in $addlibs; do
  1015. -    # Extract the objects.
  1016. -    xdir="$xlib"x
  1017. -    generated="$generated $xdir"
  1018. -    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  1019. -
  1020. -    $show "${rm}r $xdir"
  1021. -    $run ${rm}r "$xdir"
  1022. -    $show "mkdir $xdir"
  1023. -    $run mkdir "$xdir"
  1024. +      if test -n "$addlibs"; then
  1025. +    gentop="$output_objdir/${outputname}x"
  1026. +    $show "${rm}r $gentop"
  1027. +    $run ${rm}r "$gentop"
  1028. +    $show "mkdir $gentop"
  1029. +    $run mkdir "$gentop"
  1030.      status=$?
  1031. -    if test $status -ne 0 && test ! -d "$xdir"; then
  1032. +    if test $status -ne 0 && test ! -d "$gentop"; then
  1033.        exit $status
  1034.      fi
  1035. -    $show "(cd $xdir && $AR x ../$xlib)"
  1036. -    $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  1037. +    generated="$generated $gentop"
  1038. +      
  1039. +    # Add in members from convenience archives.
  1040. +    for xlib in $addlibs; do
  1041. +      # Extract the objects.
  1042. +      case "$xlib" in
  1043. +      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  1044. +      *) xabs=`pwd`"/$xlib" ;;
  1045. +      esac
  1046. +      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  1047. +      xdir="$gentop/$xlib"
  1048.  
  1049. -    oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  1050. -      done
  1051. +      $show "${rm}r $xdir"
  1052. +      $run ${rm}r "$xdir"
  1053. +      $show "mkdir $xdir"
  1054. +      $run mkdir "$xdir"
  1055. +      status=$?
  1056. +      if test $status -ne 0 && test ! -d "$xdir"; then
  1057. +        exit $status
  1058. +      fi
  1059. +      $show "(cd $xdir && $AR x $xabs)"
  1060. +      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  1061. +
  1062. +      oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  1063. +    done
  1064. +      fi
  1065.  
  1066.        # Do each command in the archive commands.
  1067.        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  1068.      eval cmds=\"$old_archive_from_new_cmds\"
  1069.        else
  1070. +    # Ensure that we have .o objects in place incase we decided
  1071. +    # not to build a shared library, and have fallen back to building
  1072. +    # static libs even though --disable-static was passed!
  1073. +    for oldobj in $oldobjs; do
  1074. +      if test ! -f $oldobj; then
  1075. +        obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
  1076. +        $show "${LN_S} $obj $oldobj"
  1077. +        $run ${LN_S} $obj $oldobj || exit $?
  1078. +      fi
  1079. +    done
  1080. +
  1081.      eval cmds=\"$old_archive_cmds\"
  1082.        fi
  1083.        IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  1084. @@ -2845,9 +2950,20 @@
  1085.  
  1086.        # Only create the output if not a dry run.
  1087.        if test -z "$run"; then
  1088. -    $echo > $output "\
  1089. -# $output - a libtool library file
  1090. +    for installed in no yes; do
  1091. +      if test "$installed" = yes; then
  1092. +        if test -z "$install_libdir"; then
  1093. +          break
  1094. +        fi
  1095. +        output="$output_objdir/$outputname"i
  1096. +      fi
  1097. +      $rm $output
  1098. +      $echo > $output "\
  1099. +# $outputname - a libtool library file
  1100.  # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1101. +#
  1102. +# Please DO NOT delete this file!
  1103. +# It is necessary for linking the library.
  1104.  
  1105.  # The name that we can dlopen(3).
  1106.  dlname='$dlname'
  1107. @@ -2867,15 +2983,12 @@
  1108.  revision=$revision
  1109.  
  1110.  # Is this an already installed library?
  1111. -installed=no
  1112. +installed=$installed
  1113.  
  1114.  # Directory that this library needs to be installed in:
  1115.  libdir='$install_libdir'\
  1116.  "
  1117. -
  1118. -    $rm "$output_objdir/$outputname"i
  1119. -    sed 's/^installed=no$/installed=yes/' \
  1120. -      < "$output" > "$output_objdir/$outputname"i || exit 1
  1121. +    done
  1122.        fi
  1123.  
  1124.        # Do a symbolic link so that the libtool archive can be found in
  1125. @@ -3012,7 +3125,7 @@
  1126.        fi
  1127.      fi
  1128.      case "$destdir" in
  1129. -    /* | [A-Za-z]:[/\\]*) ;;
  1130. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  1131.      *)
  1132.        for file in $files; do
  1133.      case "$file" in
  1134. @@ -3123,12 +3236,6 @@
  1135.      # Install the pseudo-library for information purposes.
  1136.      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1137.      instname="$dir/$name"i
  1138. -    if test ! -f "$instname"; then
  1139. -      # Just in case it was removed...
  1140. -      $show "Creating $instname"
  1141. -      $rm "$instname"
  1142. -      sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
  1143. -    fi
  1144.      $show "$install_prog $instname $destdir/$name"
  1145.      $run eval "$install_prog $instname $destdir/$name" || exit $?
  1146.  
  1147. @@ -3226,21 +3333,29 @@
  1148.  
  1149.        outputname=
  1150.        if test "$fast_install" = no && test -n "$relink_command"; then
  1151. -        if test "$finalize" = yes; then
  1152. -          outputname="/tmp/$$-$file"
  1153. +        if test "$finalize" = yes && test -z "$run"; then
  1154. +          tmpdir="/tmp"
  1155. +          test -n "$TMPDIR" && tmpdir="$TMPDIR"
  1156. +          tmpdir="$tmpdir/libtool-$$"
  1157. +          if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
  1158. +          else
  1159. +        $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  1160. +        continue
  1161. +          fi
  1162. +          outputname="$tmpdir/$file"
  1163.            # Replace the output file specification.
  1164.            relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  1165.  
  1166. -          $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
  1167.            $show "$relink_command"
  1168.            if $run eval "$relink_command"; then :
  1169.            else
  1170.          $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  1171. +        ${rm}r "$tmpdir"
  1172.          continue
  1173.            fi
  1174.            file="$outputname"
  1175.          else
  1176. -          $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
  1177. +          $echo "$modename: warning: cannot relink \`$file'" 1>&2
  1178.          fi
  1179.        else
  1180.          # Install the binary that we compiled earlier.
  1181. @@ -3250,7 +3365,7 @@
  1182.  
  1183.      $show "$install_prog$stripme $file $destfile"
  1184.      $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  1185. -    test -n "$outputname" && $rm $outputname
  1186. +    test -n "$outputname" && ${rm}r "$tmpdir"
  1187.      ;;
  1188.        esac
  1189.      done
  1190. @@ -3718,6 +3833,8 @@
  1191.    -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  1192.    -export-symbols SYMFILE
  1193.              try to export only the symbols listed in SYMFILE
  1194. +  -export-symbols-regex REGEX
  1195. +            try to export only the symbols matching REGEX
  1196.    -LLIBDIR          search LIBDIR for required installed libraries
  1197.    -lNAME            OUTPUT-FILE requires the installed library libNAME
  1198.    -module           build a library that can dlopened
  1199. @@ -3748,7 +3865,7 @@
  1200.    ;;
  1201.  
  1202.  uninstall)
  1203. -  $echo
  1204. +  $echo \
  1205.  "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  1206.  
  1207.  Remove libraries from an installation directory.
  1208. --- ./popt/ltconfig    Tue Jul  6 10:33:53 1999
  1209. +++ ../ORBit-0.4.91/./popt/ltconfig    Tue Jul  6 18:28:53 1999
  1210. @@ -2,7 +2,7 @@
  1211.  
  1212.  # ltconfig - Create a system-specific libtool.
  1213.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  1214. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  1215. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  1216.  #
  1217.  # This file is free software; you can redistribute it and/or modify it
  1218.  # under the terms of the GNU General Public License as published by
  1219. @@ -32,12 +32,8 @@
  1220.    # Discard the --no-reexec flag, and continue.
  1221.    shift
  1222.  elif test "X$1" = X--fallback-echo; then
  1223. -  # used as fallback echo
  1224. -  shift
  1225. -  cat <<EOF
  1226. -$*
  1227. -EOF
  1228. -  exit 0
  1229. +  # Avoid inline document here, it may be left over
  1230. +  :
  1231.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  1232.    # Yippee, $echo works!
  1233.    :
  1234. @@ -46,6 +42,15 @@
  1235.    exec "$SHELL" "$0" --no-reexec ${1+"$@"}
  1236.  fi
  1237.  
  1238. +if test "X$1" = X--fallback-echo; then
  1239. +  # used as fallback echo
  1240. +  shift
  1241. +  cat <<EOF
  1242. +$*
  1243. +EOF
  1244. +  exit 0
  1245. +fi
  1246. +
  1247.  # Find the correct PATH separator.  Usually this is `:', but
  1248.  # DJGPP uses `;' like DOS.
  1249.  if test "X${PATH_SEPARATOR+set}" != "Xset"; then
  1250. @@ -82,7 +87,7 @@
  1251.  
  1252.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1253.    for dir in $PATH /usr/ucb; do
  1254. -    if test -f $dir/echo &&
  1255. +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  1256.         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  1257.         test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  1258.        echo="$dir/echo"
  1259. @@ -97,7 +102,8 @@
  1260.         test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  1261.        # This shell has a builtin print -r that does the trick.
  1262.        echo='print -r'
  1263. -    elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
  1264. +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  1265. +     test "X$CONFIG_SHELL" != X/bin/ksh; then
  1266.        # If we have ksh, try running ltconfig again with it.
  1267.        ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  1268.        export ORIGINAL_CONFIG_SHELL
  1269. @@ -163,8 +169,8 @@
  1270.  # Constants:
  1271.  PROGRAM=ltconfig
  1272.  PACKAGE=libtool
  1273. -VERSION=1.2f
  1274. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  1275. +VERSION=1.3.2
  1276. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  1277.  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
  1278.  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
  1279.  rm="rm -f"
  1280. @@ -179,6 +185,7 @@
  1281.  enable_static=yes
  1282.  enable_fast_install=yes
  1283.  enable_dlopen=unknown
  1284. +enable_win32_dll=no
  1285.  ltmain=
  1286.  silent=
  1287.  srcdir=
  1288. @@ -200,11 +207,14 @@
  1289.  old_CC="$CC"
  1290.  old_CFLAGS="$CFLAGS"
  1291.  old_CPPFLAGS="$CPPFLAGS"
  1292. +old_LDFLAGS="$LDFLAGS"
  1293.  old_LD="$LD"
  1294.  old_LN_S="$LN_S"
  1295. +old_LIBS="$LIBS"
  1296.  old_NM="$NM"
  1297.  old_RANLIB="$RANLIB"
  1298.  old_DLLTOOL="$DLLTOOL"
  1299. +old_OBJDUMP="$OBJDUMP"
  1300.  old_AS="$AS"
  1301.  
  1302.  # Parse the command line options.
  1303. @@ -235,7 +245,7 @@
  1304.      --disable-static       do not build static libraries
  1305.      --disable-fast-install do not optimize for fast installation
  1306.      --enable-dlopen        enable dlopen support
  1307. -    --enable-dlopen-self   enable support for dlopening programs
  1308. +    --enable-win32-dll     enable building dlls on win32 hosts
  1309.      --help                 display this help and exit
  1310.      --no-verify            do not verify that HOST is a valid host type
  1311.  -o, --output=FILE          specify the output file [default=$default_ofile]
  1312. @@ -269,6 +279,8 @@
  1313.  
  1314.    --enable-dlopen) enable_dlopen=yes ;;
  1315.  
  1316. +  --enable-win32-dll) enable_win32_dll=yes ;;
  1317. +
  1318.    --quiet | --silent) silent=yes ;;
  1319.  
  1320.    --srcdir) prev=srcdir ;;
  1321. @@ -463,6 +475,9 @@
  1322.  # Set a sane default for `AR'.
  1323.  test -z "$AR" && AR=ar
  1324.  
  1325. +# Set a sane default for `OBJDUMP'.
  1326. +test -z "$OBJDUMP" && OBJDUMP=objdump
  1327. +
  1328.  # If RANLIB is not set, then run the test.
  1329.  if test "${RANLIB+set}" != "set"; then
  1330.    result=no
  1331. @@ -471,7 +486,7 @@
  1332.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1333.    for dir in $PATH; do
  1334.      test -z "$dir" && dir=.
  1335. -    if test -f $dir/ranlib; then
  1336. +    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
  1337.        RANLIB="ranlib"
  1338.        result="ranlib"
  1339.        break
  1340. @@ -487,8 +502,9 @@
  1341.    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  1342.  fi
  1343.  
  1344. -# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
  1345. +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
  1346.  test -z "$DLLTOOL" && DLLTOOL=dlltool
  1347. +test -z "$OBJDUMP" && OBJDUMP=objdump
  1348.  test -z "$AS" && AS=as
  1349.  
  1350.  # Check to see if we are using GCC.
  1351. @@ -498,9 +514,8 @@
  1352.      echo $ac_n "checking for gcc... $ac_c" 1>&6
  1353.      IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1354.      for dir in $PATH; do
  1355. -      IFS="$save_ifs"
  1356.        test -z "$dir" && dir=.
  1357. -      if test -f $dir/gcc; then
  1358. +      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
  1359.      CC="gcc"
  1360.      break
  1361.        fi
  1362. @@ -521,7 +536,7 @@
  1363.      cc_rejected=no
  1364.      for dir in $PATH; do
  1365.        test -z "$dir" && dir=.
  1366. -      if test -f $dir/cc; then
  1367. +      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
  1368.      if test "$dir/cc" = "/usr/ucb/cc"; then
  1369.        cc_rejected=yes
  1370.        continue
  1371. @@ -561,7 +576,7 @@
  1372.    # Now see if the compiler is really GCC.
  1373.    with_gcc=no
  1374.    echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
  1375. -  echo "$progname:564: checking whether we are using GNU C" >&5
  1376. +  echo "$progname:579: checking whether we are using GNU C" >&5
  1377.  
  1378.    $rm conftest.c
  1379.    cat > conftest.c <<EOF
  1380. @@ -569,7 +584,7 @@
  1381.    yes;
  1382.  #endif
  1383.  EOF
  1384. -  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1385. +  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  1386.      with_gcc=yes
  1387.    fi
  1388.    $rm conftest.c
  1389. @@ -583,8 +598,8 @@
  1390.  echo $ac_n "checking for object suffix... $ac_c" 1>&6
  1391.  $rm conftest*
  1392.  echo 'int i = 1;' > conftest.c
  1393. -echo "$progname:586: checking for object suffix" >& 5
  1394. -if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  1395. +echo "$progname:601: checking for object suffix" >& 5
  1396. +if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  1397.    # Append any warnings to the config.log.
  1398.    cat conftest.err 1>&5
  1399.  
  1400. @@ -635,6 +650,11 @@
  1401.      # like `-m68040'.
  1402.      pic_flag='-m68020 -resident32 -malways-restore-a4'
  1403.      ;;
  1404. +  sysv4*MP*)
  1405. +    if test -d /usr/nec; then
  1406. +       pic_flag=-Kconform_pic
  1407. +    fi
  1408. +    ;;
  1409.    *)
  1410.      pic_flag='-fPIC'
  1411.      ;;
  1412. @@ -688,7 +708,7 @@
  1413.      wl='-Qoption ld '
  1414.      ;;
  1415.  
  1416. -  sysv4.2uw2* | sysv4.3* | sysv5*)
  1417. +  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1418.      pic_flag='-KPIC'
  1419.      link_static_flag='-Bstatic'
  1420.      wl='-Wl,'
  1421. @@ -698,7 +718,12 @@
  1422.      pic_flag='-pic'
  1423.      link_static_flag='-Bstatic'
  1424.      ;;
  1425. -
  1426. +  sysv4*MP*)
  1427. +    if test -d /usr/nec ;then
  1428. +      pic_flag='-Kconform_pic'
  1429. +      link_static_flag='-Bstatic'
  1430. +    fi
  1431. +    ;;
  1432.    *)
  1433.      can_build_shared=no
  1434.      ;;
  1435. @@ -714,8 +739,8 @@
  1436.    echo "int some_variable = 0;" > conftest.c
  1437.    save_CFLAGS="$CFLAGS"
  1438.    CFLAGS="$CFLAGS $pic_flag -DPIC"
  1439. -  echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
  1440. -  if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  1441. +  echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5
  1442. +  if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  1443.      # Append any warnings to the config.log.
  1444.      cat conftest.err 1>&5
  1445.      
  1446. @@ -753,16 +778,26 @@
  1447.  
  1448.  # Check to see if options -o and -c are simultaneously supported by compiler
  1449.  echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
  1450. +$rm -r conftest 2>/dev/null
  1451. +mkdir conftest
  1452. +cd conftest
  1453.  $rm conftest*
  1454.  echo "int some_variable = 0;" > conftest.c
  1455. +mkdir out
  1456. +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  1457. +# that will create temporary files in the current directory regardless of
  1458. +# the output directory.  Thus, making CWD read-only will cause this test
  1459. +# to fail, enabling locking or at least warning the user not to do parallel
  1460. +# builds.
  1461. +chmod -w .
  1462.  save_CFLAGS="$CFLAGS"
  1463. -CFLAGS="$CFLAGS -c -o conftest2.o"
  1464. -echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
  1465. -if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
  1466. +CFLAGS="$CFLAGS -o out/conftest2.o"
  1467. +echo "$progname:795: checking if $compiler supports -c -o file.o" >&5
  1468. +if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  1469.  
  1470.    # The compiler can only warn and ignore the option if not recognized
  1471.    # So say no if there are warnings
  1472. -    if test -s conftest.err; then
  1473. +    if test -s out/conftest.err; then
  1474.        echo "$ac_t"no 1>&6
  1475.        compiler_c_o=no
  1476.      else
  1477. @@ -771,12 +806,17 @@
  1478.      fi
  1479.  else
  1480.    # Append any errors to the config.log.
  1481. -  cat conftest.err 1>&5
  1482. +  cat out/conftest.err 1>&5
  1483.    compiler_c_o=no
  1484.    echo "$ac_t"no 1>&6
  1485.  fi
  1486.  CFLAGS="$save_CFLAGS"
  1487. -$rm conftest*
  1488. +chmod u+w .
  1489. +$rm conftest* out/*
  1490. +rmdir out
  1491. +cd ..
  1492. +rmdir conftest
  1493. +$rm -r conftest 2>/dev/null
  1494.  
  1495.  if test x"$compiler_c_o" = x"yes"; then
  1496.    # Check to see if we can write to a .lo
  1497. @@ -785,8 +825,8 @@
  1498.    echo "int some_variable = 0;" > conftest.c
  1499.    save_CFLAGS="$CFLAGS"
  1500.    CFLAGS="$CFLAGS -c -o conftest.lo"
  1501. -  echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
  1502. -if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  1503. +  echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5
  1504. +if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  1505.  
  1506.      # The compiler can only warn and ignore the option if not recognized
  1507.      # So say no if there are warnings
  1508. @@ -837,8 +877,8 @@
  1509.    echo "int some_variable = 0;" > conftest.c
  1510.    save_CFLAGS="$CFLAGS"
  1511.    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
  1512. -  echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  1513. -  if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  1514. +  echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  1515. +  if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  1516.  
  1517.      # The compiler can only warn and ignore the option if not recognized
  1518.      # So say no if there are warnings
  1519. @@ -881,8 +921,8 @@
  1520.  echo 'main(){return(0);}' > conftest.c
  1521.  save_LDFLAGS="$LDFLAGS"
  1522.  LDFLAGS="$LDFLAGS $link_static_flag"
  1523. -echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
  1524. -if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1525. +echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5
  1526. +if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1527.    echo "$ac_t$link_static_flag" 1>&6
  1528.  else
  1529.    echo "$ac_t"none 1>&6
  1530. @@ -894,9 +934,9 @@
  1531.  if test -z "$LN_S"; then
  1532.    # Check to see if we can use ln -s, or we need hard links.
  1533.    echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
  1534. -  $rm conftestdata
  1535. -  if ln -s X conftestdata 2>/dev/null; then
  1536. -    $rm conftestdata
  1537. +  $rm conftest.dat
  1538. +  if ln -s X conftest.dat 2>/dev/null; then
  1539. +    $rm conftest.dat
  1540.      LN_S="ln -s"
  1541.    else
  1542.      LN_S=ln
  1543. @@ -914,11 +954,11 @@
  1544.    if test "$with_gcc" = yes; then
  1545.      # Check if gcc -print-prog-name=ld gives a path.
  1546.      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
  1547. -    echo "$progname:917: checking for ld used by GCC" >&5
  1548. +    echo "$progname:957: checking for ld used by GCC" >&5
  1549.      ac_prog=`($CC -print-prog-name=ld) 2>&5`
  1550.      case "$ac_prog" in
  1551.      # Accept absolute paths.
  1552. -    /* | [A-Za-z]:[\\/]*)
  1553. +    [\\/]* | [A-Za-z]:[\\/]*)
  1554.        re_direlt='/[^/][^/]*/\.\./'
  1555.        # Canonicalize the path of ld
  1556.        ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  1557. @@ -938,10 +978,10 @@
  1558.      esac
  1559.    elif test "$with_gnu_ld" = yes; then
  1560.      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
  1561. -    echo "$progname:941: checking for GNU ld" >&5
  1562. +    echo "$progname:981: checking for GNU ld" >&5
  1563.    else
  1564.      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  1565. -    echo "$progname:944: checking for non-GNU ld" >&5
  1566. +    echo "$progname:984: checking for non-GNU ld" >&5
  1567.    fi
  1568.  
  1569.    if test -z "$LD"; then
  1570. @@ -948,7 +988,7 @@
  1571.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1572.      for ac_dir in $PATH; do
  1573.        test -z "$ac_dir" && ac_dir=.
  1574. -      if test -f "$ac_dir/$ac_prog"; then
  1575. +      if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  1576.      LD="$ac_dir/$ac_prog"
  1577.      # Check to see if the program is GNU ld.  I'd rather use --version,
  1578.      # but apparently some GNU ld's only accept -v.
  1579. @@ -1015,7 +1055,12 @@
  1580.  # it will be wrapped by ` (' and `)$', so one must not match beginning or
  1581.  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  1582.  # as well as any symbol that contains `d'.
  1583. -exclude_expsyms=
  1584. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  1585. +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  1586. +# platforms (ab)use it in PIC code, but their linkers get confused if
  1587. +# the symbol is explicitly referenced.  Since portable code cannot
  1588. +# rely on this symbol name, it's probably fine to never include it in
  1589. +# preloaded symbol tables.
  1590.  
  1591.  case "$host_os" in
  1592.  cygwin* | mingw*)
  1593. @@ -1027,10 +1072,6 @@
  1594.    fi
  1595.    ;;
  1596.  
  1597. -freebsd2* | sunos4*)
  1598. -  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  1599. -  ;;
  1600. -
  1601.  esac
  1602.  
  1603.  ld_shlibs=yes
  1604. @@ -1058,18 +1099,21 @@
  1605.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  1606.      hardcode_libdir_flag_spec='-L$libdir'
  1607.      hardcode_minus_L=yes
  1608. -    ;;
  1609.  
  1610. -  sunos4*)
  1611. -    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1612. -    wlarc=
  1613. -    hardcode_direct=yes
  1614. -    hardcode_minus_L=yes
  1615. -    hardcode_shlibpath_var=no
  1616. +    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  1617. +    # that the semantics of dynamic libraries on AmigaOS, at least up
  1618. +    # to version 4, is to share data among multiple programs linked
  1619. +    # with the same dynamic library.  Since this doesn't match the
  1620. +    # behavior of shared libraries on other platforms, we can use
  1621. +    # them.
  1622. +    ld_shlibs=no
  1623.      ;;
  1624.  
  1625.    beos*)
  1626.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1627. +      allow_undefined_flag=unsupported
  1628. +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1629. +      # support --undefined.  This deserves some investigation.  FIXME
  1630.        archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1631.      else
  1632.        ld_shlibs=no
  1633. @@ -1087,7 +1131,7 @@
  1634.      # then regenerate the def file from the symbol export list, so that
  1635.      # the compiled dll only exports the symbol export list.
  1636.      export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
  1637. -      sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  1638. +      sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  1639.        (cd $objdir && $CC -c $soname-ltdll.c)~
  1640.        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs~
  1641.        sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  1642. @@ -1095,7 +1139,7 @@
  1643.      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  1644.        _lt_hint=1;
  1645.        for symbol in `cat $export_symbols`; do
  1646. -        echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  1647. +    echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  1648.      _lt_hint=`expr 1 + \$_lt_hint`;
  1649.        done~
  1650.        $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
  1651. @@ -1107,6 +1151,44 @@
  1652.        old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
  1653.      ;;
  1654.  
  1655. +  netbsd*)
  1656. +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1657. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1658. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1659. +    else
  1660. +      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
  1661. +      # can we support soname and/or expsyms with a.out? -oliva
  1662. +    fi
  1663. +    ;;
  1664. +
  1665. +  solaris*)
  1666. +    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  1667. +      ld_shlibs=no
  1668. +      cat <<EOF 1>&2
  1669. +
  1670. +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1671. +*** create shared libraries on Solaris systems.  Therefore, libtool
  1672. +*** is disabling shared libraries support.  We urge you to upgrade GNU
  1673. +*** binutils to release 2.9.1 or newer.  Another option is to modify
  1674. +*** your PATH or compiler configuration so that the native linker is
  1675. +*** used, and then restart.
  1676. +
  1677. +EOF
  1678. +    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1679. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1680. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1681. +    else
  1682. +      ld_shlibs=no
  1683. +    fi
  1684. +    ;;      
  1685. +
  1686. +  sunos4*)
  1687. +    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1688. +    wlarc=
  1689. +    hardcode_direct=yes
  1690. +    hardcode_shlibpath_var=no
  1691. +    ;;
  1692. +
  1693.    *)
  1694.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1695.        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1696. @@ -1121,7 +1203,15 @@
  1697.      runpath_var=LD_RUN_PATH
  1698.      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1699.      export_dynamic_flag_spec='${wl}--export-dynamic'
  1700. -    whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1701. +    case $host_os in
  1702. +    cygwin* | mingw*)
  1703. +      # dlltool doesn't understand --whole-archive et. al.
  1704. +      whole_archive_flag_spec=
  1705. +      ;;
  1706. +    *)
  1707. +      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1708. +      ;;
  1709. +    esac
  1710.    fi
  1711.  else
  1712.    # PORTME fill in a description of your system's linker (not GNU ld)
  1713. @@ -1141,10 +1231,12 @@
  1714.      ;;
  1715.  
  1716.    aix4*)
  1717. -    allow_undefined_flag=
  1718. +    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  1719. +    hardcode_libdir_separator=':'
  1720.      if test "$with_gcc" = yes; then
  1721. -      if strings `${CC} -print-prog-name=collect2` | \
  1722. -     grep resolve_lib_name >/dev/null
  1723. +      collect2name=`${CC} -print-prog-name=collect2`
  1724. +      if test -f "$collect2name" && \
  1725. +     strings "$collect2name" | grep resolve_lib_name >/dev/null
  1726.        then
  1727.      # We have reworked collect2
  1728.      hardcode_direct=yes
  1729. @@ -1151,19 +1243,25 @@
  1730.        else
  1731.      # We have old collect2
  1732.      hardcode_direct=unsupported
  1733. +    # It fails to find uninstalled libraries when the uninstalled
  1734. +    # path is not listed in the libpath.  Setting hardcode_minus_L
  1735. +    # to unsupported forces relinking
  1736. +    hardcode_minus_L=yes
  1737. +    hardcode_libdir_flag_spec='-L$libdir'
  1738. +    hardcode_libdir_separator=
  1739.        fi
  1740. -      archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
  1741. +      shared_flag='-shared'
  1742.      else
  1743. -      always_export_symbols=yes
  1744. -      archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
  1745. +      shared_flag='${wl}-bM:SRE'
  1746.        hardcode_direct=yes
  1747.      fi
  1748. -    hardcode_minus_L=yes
  1749. -    # Though LIBPATH variable hardcodes shlibpath into executable,
  1750. -    # it doesn't affect searching for -l* libraries; this confuses
  1751. -    # tests in mdemo.
  1752. -    hardcode_shlibpath_var=unsupported
  1753. -    hardcode_libdir_flag_spec='-L$libdir'
  1754. +    allow_undefined_flag=' ${wl}-berok'
  1755. +    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  1756. +    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  1757. +    case "$host_os" in aix4.[01]|aix4.[01].*)
  1758. +      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  1759. +      always_export_symbols=yes ;;
  1760. +    esac
  1761.     ;;
  1762.  
  1763.    amigaos*)
  1764. @@ -1170,6 +1268,8 @@
  1765.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  1766.      hardcode_libdir_flag_spec='-L$libdir'
  1767.      hardcode_minus_L=yes
  1768. +    # see comment about different semantics on the GNU ld section
  1769. +    ld_shlibs=no
  1770.      ;;
  1771.  
  1772.    cygwin* | mingw*)
  1773. @@ -1192,7 +1292,6 @@
  1774.  
  1775.    freebsd1*)
  1776.      ld_shlibs=no
  1777. -    can_build_shared=no
  1778.      ;;
  1779.  
  1780.    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1781. @@ -1203,7 +1302,6 @@
  1782.      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  1783.      hardcode_libdir_flag_spec='-R$libdir'
  1784.      hardcode_direct=yes
  1785. -    hardcode_minus_L=no # verified on 2.2.6
  1786.      hardcode_shlibpath_var=no
  1787.      ;;
  1788.  
  1789. @@ -1220,31 +1318,27 @@
  1790.      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  1791.      hardcode_libdir_flag_spec='-R$libdir'
  1792.      hardcode_direct=yes
  1793. -    hardcode_minus_L=no
  1794.      hardcode_shlibpath_var=no
  1795.      ;;
  1796.  
  1797. -  hpux9*)
  1798. -    archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
  1799. -    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1800. -    hardcode_direct=yes
  1801. -    hardcode_minus_L=yes
  1802. -    export_dynamic_flag_spec='${wl}-E'
  1803. -    ;;
  1804. -
  1805. -  hpux10* | hpux11*)
  1806. -    archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
  1807. +  hpux9* | hpux10* | hpux11*)
  1808. +    case "$host_os" in
  1809. +    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
  1810. +    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  1811. +    esac
  1812.      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1813. +    hardcode_libdir_separator=:
  1814.      hardcode_direct=yes
  1815. -    hardcode_minus_L=yes
  1816. +    hardcode_minus_L=yes # Not in the search PATH, but as the default
  1817. +             # location of the library.
  1818.      export_dynamic_flag_spec='${wl}-E'
  1819.      ;;
  1820.  
  1821.    irix5* | irix6*)
  1822.      if test "$with_gcc" = yes; then
  1823. -      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  1824. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1825.      else
  1826. -      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  1827. +      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1828.      fi
  1829.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1830.      hardcode_libdir_separator=:
  1831. @@ -1279,10 +1373,10 @@
  1832.    osf3* | osf4*)
  1833.      if test "$with_gcc" = yes; then
  1834.        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1835. -      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  1836. +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1837.      else
  1838.        allow_undefined_flag=' -expect_unresolved \*'
  1839. -      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  1840. +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1841.      fi
  1842.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1843.      hardcode_libdir_separator=:
  1844. @@ -1289,8 +1383,10 @@
  1845.      ;;
  1846.  
  1847.    sco3.2v5*)
  1848. -    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  1849. -    hardcode_direct=yes
  1850. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1851. +    hardcode_shlibpath_var=no
  1852. +    runpath_var=LD_RUN_PATH
  1853. +    hardcode_runpath_var=yes
  1854.      ;;
  1855.  
  1856.    solaris*)
  1857. @@ -1302,16 +1398,15 @@
  1858.          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1859.      hardcode_libdir_flag_spec='-R$libdir'
  1860.      hardcode_shlibpath_var=no
  1861. +    case "$host_os" in
  1862. +    solaris2.[0-5] | solaris2.[0-5].*) ;;
  1863. +    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1864. +      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1865. +    esac
  1866.      ;;
  1867.  
  1868.    sunos4*)
  1869. -    # Why do we need -Bstatic?  To avoid inter-library dependencies, maybe...
  1870. -    if test "$with_gcc" = yes; then
  1871. -      # Use -fPIC here because libgcc is multilibbed
  1872. -      archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
  1873. -    else
  1874. -      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1875. -    fi
  1876. +    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1877.      hardcode_libdir_flag_spec='-L$libdir'
  1878.      hardcode_direct=yes
  1879.      hardcode_minus_L=yes
  1880. @@ -1318,10 +1413,15 @@
  1881.      hardcode_shlibpath_var=no
  1882.      ;;
  1883.  
  1884. +  sysv4)
  1885. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1886. +    runpath_var='LD_RUN_PATH'
  1887. +    hardcode_shlibpath_var=no
  1888. +    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
  1889. +    ;;  
  1890. +
  1891.    sysv4.3*)
  1892.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1893. -    hardcode_direct=no
  1894. -    hardcode_minus_L=no
  1895.      hardcode_shlibpath_var=no
  1896.      export_dynamic_flag_spec='-Bexport'
  1897.      ;;
  1898. @@ -1329,8 +1429,6 @@
  1899.    uts4*)
  1900.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1901.      hardcode_libdir_flag_spec='-L$libdir'
  1902. -    hardcode_direct=no
  1903. -    hardcode_minus_L=no
  1904.      hardcode_shlibpath_var=no
  1905.      ;;
  1906.  
  1907. @@ -1337,28 +1435,37 @@
  1908.    dgux*)
  1909.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1910.      hardcode_libdir_flag_spec='-L$libdir'
  1911. -    hardcode_direct=no
  1912. -    hardcode_minus_L=no
  1913. +    hardcode_shlibpath_var=no
  1914. +    ;;
  1915. +
  1916. +  sysv4*MP*)
  1917. +    if test -d /usr/nec ;then
  1918. +    # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
  1919. +    archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
  1920.      hardcode_shlibpath_var=no
  1921. +    runpath_var=LD_RUN_PATH
  1922. +    hardcode_runpath_var=yes
  1923. +    ld_shlibs=yes
  1924. +    fi
  1925.      ;;
  1926.  
  1927.    *)
  1928.      ld_shlibs=no
  1929. -    can_build_shared=no
  1930.      ;;
  1931.    esac
  1932.  fi
  1933.  echo "$ac_t$ld_shlibs" 1>&6
  1934. +test "$ld_shlibs" = no && can_build_shared=no
  1935.  
  1936.  if test -z "$NM"; then
  1937.    echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  1938.    case "$NM" in
  1939. -  /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
  1940. +  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  1941.    *)
  1942.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1943.      for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  1944.        test -z "$ac_dir" && ac_dir=.
  1945. -      if test -f $ac_dir/nm; then
  1946. +      if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  1947.      # Check to see if the nm accepts a BSD-compat flag.
  1948.      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  1949.      #   nm: unknown option "B" ignored
  1950. @@ -1416,6 +1523,9 @@
  1951.  solaris*)
  1952.    symcode='[BDT]'
  1953.    ;;
  1954. +sysv4)
  1955. +  symcode='[DFNSTU]'
  1956. +  ;;
  1957.  esac
  1958.  
  1959.  # If we're using GNU nm, then use its standard symbol codes.
  1960. @@ -1444,11 +1554,11 @@
  1961.  main(){nm_test_var='a';nm_test_func();return(0);}
  1962.  EOF
  1963.  
  1964. -  echo "$progname:1447: checking if global_symbol_pipe works" >&5
  1965. -  if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  1966. +  echo "$progname:1557: checking if global_symbol_pipe works" >&5
  1967. +  if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  1968.      # Now try to grab the symbols.
  1969.      nlist=conftest.nm
  1970. -    if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  1971. +    if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  1972.  
  1973.        # Try sorting and uniquifying the output.
  1974.        if sort "$nlist" | uniq > "$nlist"T; then
  1975. @@ -1495,12 +1605,12 @@
  1976.  #endif
  1977.  EOF
  1978.        # Now try linking the two files.
  1979. -      mv conftest.$objext conftestm.$objext
  1980. +      mv conftest.$objext conftstm.$objext
  1981.        save_LIBS="$LIBS"
  1982.        save_CFLAGS="$CFLAGS"
  1983. -      LIBS="conftestm.$objext"
  1984. +      LIBS="conftstm.$objext"
  1985.        CFLAGS="$CFLAGS$no_builtin_flag"
  1986. -      if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1987. +      if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1988.          pipe_works=yes
  1989.        else
  1990.          echo "$progname: failed program was:" >&5
  1991. @@ -1520,7 +1630,7 @@
  1992.      echo "$progname: failed program was:" >&5
  1993.      cat conftest.c >&5
  1994.    fi
  1995. -  $rm conftest*
  1996. +  $rm conftest* conftst*
  1997.  
  1998.    # Do not use the global_symbol_pipe unless it works.
  1999.    if test "$pipe_works" = yes; then
  2000. @@ -1529,7 +1639,11 @@
  2001.      global_symbol_pipe=
  2002.    fi
  2003.  done
  2004. -echo "$ac_t$pipe_works" 1>&6
  2005. +if test "$pipe_works" = yes; then
  2006. +  echo "${ac_t}ok" 1>&6
  2007. +else
  2008. +  echo "${ac_t}failed" 1>&6
  2009. +fi
  2010.  
  2011.  if test -z "$global_symbol_pipe"; then
  2012.    global_symbol_to_cdecl=
  2013. @@ -1542,10 +1656,12 @@
  2014.     test -n "$runpath_var"; then
  2015.  
  2016.    # We can hardcode non-existant directories.
  2017. -  if test "$hardcode_direct" != no && \
  2018. -     test "$hardcode_minus_L" != no && \
  2019. -     test "$hardcode_shlibpath_var" != no; then
  2020. -
  2021. +  if test "$hardcode_direct" != no &&
  2022. +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2023. +     # have to relink, otherwise we might link with an installed library
  2024. +     # when we should be linking with a yet-to-be-installed one
  2025. +     ## test "$hardcode_shlibpath_var" != no &&
  2026. +     test "$hardcode_minus_L" != no; then
  2027.      # Linking always hardcodes the temporary library directory.
  2028.      hardcode_action=relink
  2029.    else
  2030. @@ -1628,6 +1744,10 @@
  2031.    library_names_spec='${libname}.so'
  2032.    dynamic_linker="$host_os ld.so"
  2033.    shlibpath_var=LIBRARY_PATH
  2034. +  deplibs_check_method=pass_all
  2035. +  lt_cv_dlopen="load_add_on"
  2036. +  lt_cv_dlopen_libs=
  2037. +  lt_cv_dlopen_self=yes
  2038.    ;;
  2039.  
  2040.  bsdi4*)
  2041. @@ -1634,7 +1754,7 @@
  2042.    version_type=linux
  2043.    library_names_spec='${libname}.so$major ${libname}.so'
  2044.    soname_spec='${libname}.so'
  2045. -  finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
  2046. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2047.    shlibpath_var=LD_LIBRARY_PATH
  2048.    deplibs_check_method='file_magic ELF 32-bit LSB shared object'
  2049.    file_magic_cmd=/usr/bin/file
  2050. @@ -1654,11 +1774,13 @@
  2051.      library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  2052.    fi
  2053.    dynamic_linker='Win32 ld.exe'
  2054. -  deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
  2055. -  file_magic_cmd='objdump -f'
  2056. +  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2057. +  file_magic_cmd='${OBJDUMP} -f'
  2058.    need_lib_prefix=no
  2059.    # FIXME: first we should search . and the directory the executable is in
  2060.    shlibpath_var=PATH
  2061. +  lt_cv_dlopen="LoadLibrary"
  2062. +  lt_cv_dlopen_libs=
  2063.    ;;
  2064.  
  2065.  freebsd1*)
  2066. @@ -1683,7 +1805,7 @@
  2067.        need_version=yes
  2068.        ;;
  2069.    esac
  2070. -  finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  2071. +  finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  2072.    shlibpath_var=LD_LIBRARY_PATH
  2073.    ;;
  2074.  
  2075. @@ -1701,6 +1823,7 @@
  2076.    need_lib_prefix=no
  2077.    need_version=no
  2078.    shlibpath_var=SHLIB_PATH
  2079. +  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2080.    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  2081.    soname_spec='${libname}${release}.sl$major'
  2082.    # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2083. @@ -1707,40 +1830,36 @@
  2084.    postinstall_cmds='chmod 555 $lib'
  2085.    ;;
  2086.  
  2087. -irix5*)
  2088. -  version_type=irix
  2089. -  soname_spec='${libname}${release}.so'
  2090. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2091. -  shlibpath_var=LD_LIBRARY_PATH
  2092. -  deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
  2093. -  file_magic_cmd=/usr/bin/file
  2094. -  file_magic_test_file=`echo /lib/libc.so*`
  2095. -  shlibpath_overrides_runpath=no
  2096. -  ;;
  2097. -
  2098. -irix6*)
  2099. +irix5* | irix6*)
  2100.    version_type=irix
  2101.    need_lib_prefix=no
  2102.    need_version=no
  2103. -  soname_spec='${libname}${release}.so'
  2104. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2105. -  case "$LD" in # libtool.m4 will add one of these switches to LD
  2106. -  *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  2107. -  *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  2108. -  *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2109. -  *) libsuff= shlibsuff= libmagic=never-match;;
  2110. +  soname_spec='${libname}${release}.so.$major'
  2111. +  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  2112. +  case "$host_os" in
  2113. +  irix5*)
  2114. +    libsuff= shlibsuff=
  2115. +    # this will be overridden with pass_all, but let us keep it just in case
  2116. +    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  2117. +    ;;
  2118. +  *)
  2119. +    case "$LD" in # libtool.m4 will add one of these switches to LD
  2120. +    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  2121. +    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  2122. +    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2123. +    *) libsuff= shlibsuff= libmagic=never-match;;
  2124. +    esac
  2125. +    # this will be overridden with pass_all, but let us keep it just in case
  2126. +    deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
  2127. +    ;;
  2128.    esac
  2129.    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2130.    shlibpath_overrides_runpath=no
  2131. -  # even though /usr/local/lib is always searched, the man-page says
  2132. -  # shared libraries should not be installed there if they use an ABI
  2133. -  # different from -32, so we'd better not search for shared libraries
  2134. -  # there either
  2135. -  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  2136. -  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  2137. -  deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
  2138. +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2139. +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2140.    file_magic_cmd=/usr/bin/file
  2141.    file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  2142. +  deplibs_check_method='pass_all'
  2143.    ;;
  2144.  
  2145.  # No shared lib support for Linux oldld, aout, or coff.
  2146. @@ -1755,7 +1874,7 @@
  2147.    need_version=no
  2148.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2149.    soname_spec='${libname}${release}.so$major'
  2150. -  finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
  2151. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2152.    shlibpath_var=LD_LIBRARY_PATH
  2153.    shlibpath_overrides_runpath=no
  2154.    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  2155. @@ -1777,7 +1896,7 @@
  2156.    version_type=sunos
  2157.    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2158.      library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2159. -    finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
  2160. +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2161.      dynamic_linker='NetBSD (a.out) ld.so'
  2162.    else
  2163.      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  2164. @@ -1808,17 +1927,15 @@
  2165.  
  2166.  osf3* | osf4*)
  2167.    version_type=osf
  2168. +  need_version=no
  2169.    soname_spec='${libname}${release}.so'
  2170.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2171.    shlibpath_var=LD_LIBRARY_PATH
  2172. -  # deplibs_check_method='pass_all'
  2173. -  # Although pass_all appears to work, it copies symbols from static libraries
  2174. -  # into shared ones and exports them.  So, when a program is linked with two
  2175. -  # or more libraries that have got copies of the same symbols, link fails
  2176. -  # This was only tested on osf4:
  2177. +  # this will be overridden with pass_all, but let us keep it just in case
  2178.    deplibs_check_method='file_magic COFF format alpha shared library'
  2179.    file_magic_cmd=/usr/bin/file
  2180.    file_magic_test_file=/shlib/libc.so
  2181. +  deplibs_check_method='pass_all'
  2182.    sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2183.    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2184.    ;;
  2185. @@ -1857,7 +1974,7 @@
  2186.    need_version=yes
  2187.    ;;
  2188.  
  2189. -sysv4.2uw2* | sysv4.3* | sysv5*)
  2190. +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2191.    version_type=linux
  2192.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2193.    soname_spec='${libname}${release}.so$major'
  2194. @@ -1866,6 +1983,15 @@
  2195.      ncr)
  2196.        deplibs_check_method='pass_all'
  2197.        ;;
  2198. +    motorola)
  2199. +      need_lib_prefix=no
  2200. +      need_version=no
  2201. +      shlibpath_overrides_runpath=no
  2202. +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2203. +      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
  2204. +      file_magic_cmd=/usr/bin/file
  2205. +      file_magic_test_file=`echo /usr/lib/libc.so*`
  2206. +      ;;
  2207.    esac
  2208.    ;;
  2209.  
  2210. @@ -1885,6 +2011,15 @@
  2211.    shlibpath_var=LD_LIBRARY_PATH
  2212.    ;;
  2213.  
  2214. +sysv4*MP*)
  2215. +  if test -d /usr/nec ;then
  2216. +    version_type=linux
  2217. +    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  2218. +    soname_spec='$libname.so.$major'
  2219. +    shlibpath_var=LD_LIBRARY_PATH
  2220. +  fi
  2221. +  ;;
  2222. +
  2223.  *)
  2224.    dynamic_linker=no
  2225.    ;;
  2226. @@ -1895,6 +2030,17 @@
  2227.  # Report the final consequences.
  2228.  echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  2229.  
  2230. +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  2231. +# configure.in, otherwise build static only libraries.
  2232. +case "$host_os" in
  2233. +cygwin* | mingw* | os2*)
  2234. +  if test x$can_build_shared = xyes; then
  2235. +    test x$enable_win32_dll = xno && can_build_shared=no
  2236. +    echo "checking if package supports dlls... $can_build_shared" 1>&6
  2237. +  fi
  2238. +;;
  2239. +esac
  2240. +
  2241.  if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
  2242.    case "$deplibs_check_method" in
  2243.    "file_magic "*)
  2244. @@ -1973,16 +2119,16 @@
  2245.  else
  2246.  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  2247.    lt_cv_dlopen=no lt_cv_dlopen_libs=
  2248. -echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  2249. -echo "$progname:1977: checking for dlopen" >&5
  2250. -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  2251. +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2252. +echo "$progname:2123: checking for dlopen in -ldl" >&5
  2253. +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2254. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2255.    echo $ac_n "(cached) $ac_c" 1>&6
  2256.  else
  2257. -  cat > conftest.$ac_ext <<EOF
  2258. -#line 1982 "ltconfig"
  2259. -/* System header to define __stub macros and hopefully few prototypes,
  2260. -    which can conflict with char dlopen(); below.  */
  2261. -#include <assert.h>
  2262. +  ac_save_LIBS="$LIBS"
  2263. +LIBS="-ldl  $LIBS"
  2264. +cat > conftest.$ac_ext <<EOF
  2265. +#line 2131 "ltconfig"
  2266.  /* Override any gcc2 internal prototype to avoid an error.  */
  2267.  /* We use char because int might match the return type of a gcc2
  2268.      builtin and then its argument prototype would still apply.  */
  2269. @@ -1989,45 +2135,37 @@
  2270.  char dlopen();
  2271.  
  2272.  int main() {
  2273. -
  2274. -/* The GNU C library defines this for functions which it implements
  2275. -    to always fail with ENOSYS.  Some functions are actually named
  2276. -    something starting with __ and the normal name is an alias.  */
  2277. -#if defined (__stub_dlopen) || defined (__stub___dlopen)
  2278. -choke me
  2279. -#else
  2280. -dlopen();
  2281. -#endif
  2282. -
  2283. +dlopen()
  2284.  ; return 0; }
  2285.  EOF
  2286. -if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2287. +if { (eval echo $progname:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2288.    rm -rf conftest*
  2289. -  eval "ac_cv_func_dlopen=yes"
  2290. +  eval "ac_cv_lib_$ac_lib_var=yes"
  2291.  else
  2292.    echo "$progname: failed program was:" >&5
  2293.    cat conftest.$ac_ext >&5
  2294.    rm -rf conftest*
  2295. -  eval "ac_cv_func_dlopen=no"
  2296. +  eval "ac_cv_lib_$ac_lib_var=no"
  2297.  fi
  2298.  rm -f conftest*
  2299. -fi
  2300. +LIBS="$ac_save_LIBS"
  2301.  
  2302. -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  2303. +fi
  2304. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2305.    echo "$ac_t""yes" 1>&6
  2306. -  lt_cv_dlopen="dlopen"
  2307. +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  2308.  else
  2309.    echo "$ac_t""no" 1>&6
  2310. -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2311. -echo "$progname:2022: checking for dlopen in -ldl" >&5
  2312. -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2313. -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2314. +echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  2315. +echo "$progname:2160: checking for dlopen" >&5
  2316. +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  2317.    echo $ac_n "(cached) $ac_c" 1>&6
  2318.  else
  2319. -  ac_save_LIBS="$LIBS"
  2320. -LIBS="-ldl  $LIBS"
  2321. -cat > conftest.$ac_ext <<EOF
  2322. -#line 2030 "ltconfig"
  2323. +  cat > conftest.$ac_ext <<EOF
  2324. +#line 2165 "ltconfig"
  2325. +/* System header to define __stub macros and hopefully few prototypes,
  2326. +    which can conflict with char dlopen(); below.  */
  2327. +#include <assert.h>
  2328.  /* Override any gcc2 internal prototype to avoid an error.  */
  2329.  /* We use char because int might match the return type of a gcc2
  2330.      builtin and then its argument prototype would still apply.  */
  2331. @@ -2034,29 +2172,36 @@
  2332.  char dlopen();
  2333.  
  2334.  int main() {
  2335. -dlopen()
  2336. +
  2337. +/* The GNU C library defines this for functions which it implements
  2338. +    to always fail with ENOSYS.  Some functions are actually named
  2339. +    something starting with __ and the normal name is an alias.  */
  2340. +#if defined (__stub_dlopen) || defined (__stub___dlopen)
  2341. +choke me
  2342. +#else
  2343. +dlopen();
  2344. +#endif
  2345. +
  2346.  ; return 0; }
  2347.  EOF
  2348. -if { (eval echo $progname:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2349. +if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2350.    rm -rf conftest*
  2351. -  eval "ac_cv_lib_$ac_lib_var=yes"
  2352. +  eval "ac_cv_func_dlopen=yes"
  2353.  else
  2354.    echo "$progname: failed program was:" >&5
  2355.    cat conftest.$ac_ext >&5
  2356.    rm -rf conftest*
  2357. -  eval "ac_cv_lib_$ac_lib_var=no"
  2358. +  eval "ac_cv_func_dlopen=no"
  2359.  fi
  2360.  rm -f conftest*
  2361. -LIBS="$ac_save_LIBS"
  2362. -
  2363.  fi
  2364. -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2365. +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  2366.    echo "$ac_t""yes" 1>&6
  2367. -  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  2368. +  lt_cv_dlopen="dlopen"
  2369.  else
  2370.    echo "$ac_t""no" 1>&6
  2371.  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  2372. -echo "$progname:2059: checking for dld_link in -ldld" >&5
  2373. +echo "$progname:2204: checking for dld_link in -ldld" >&5
  2374.  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  2375.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2376.    echo $ac_n "(cached) $ac_c" 1>&6
  2377. @@ -2064,7 +2209,7 @@
  2378.    ac_save_LIBS="$LIBS"
  2379.  LIBS="-ldld  $LIBS"
  2380.  cat > conftest.$ac_ext <<EOF
  2381. -#line 2067 "ltconfig"
  2382. +#line 2212 "ltconfig"
  2383.  /* Override any gcc2 internal prototype to avoid an error.  */
  2384.  /* We use char because int might match the return type of a gcc2
  2385.      builtin and then its argument prototype would still apply.  */
  2386. @@ -2074,7 +2219,7 @@
  2387.  dld_link()
  2388.  ; return 0; }
  2389.  EOF
  2390. -if { (eval echo $progname:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2391. +if { (eval echo $progname:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2392.    rm -rf conftest*
  2393.    eval "ac_cv_lib_$ac_lib_var=yes"
  2394.  else
  2395. @@ -2093,12 +2238,12 @@
  2396.  else
  2397.    echo "$ac_t""no" 1>&6
  2398.  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  2399. -echo "$progname:2096: checking for shl_load" >&5
  2400. +echo "$progname:2241: checking for shl_load" >&5
  2401.  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  2402.    echo $ac_n "(cached) $ac_c" 1>&6
  2403.  else
  2404.    cat > conftest.$ac_ext <<EOF
  2405. -#line 2101 "ltconfig"
  2406. +#line 2246 "ltconfig"
  2407.  /* System header to define __stub macros and hopefully few prototypes,
  2408.      which can conflict with char shl_load(); below.  */
  2409.  #include <assert.h>
  2410. @@ -2120,7 +2265,7 @@
  2411.  
  2412.  ; return 0; }
  2413.  EOF
  2414. -if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2415. +if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2416.    rm -rf conftest*
  2417.    eval "ac_cv_func_shl_load=yes"
  2418.  else
  2419. @@ -2137,54 +2282,47 @@
  2420.    lt_cv_dlopen="shl_load"
  2421.  else
  2422.    echo "$ac_t""no" 1>&6
  2423. -echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
  2424. -echo "$progname:2141: checking for LoadLibrary" >&5
  2425. -if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
  2426. +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2427. +echo "$progname:2286: checking for shl_load in -ldld" >&5
  2428. +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2429. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2430.    echo $ac_n "(cached) $ac_c" 1>&6
  2431.  else
  2432. -  cat > conftest.$ac_ext <<EOF
  2433. -#line 2146 "ltconfig"
  2434. -/* System header to define __stub macros and hopefully few prototypes,
  2435. -    which can conflict with char LoadLibrary(); below.  */
  2436. -#include <assert.h>
  2437. +  ac_save_LIBS="$LIBS"
  2438. +LIBS="-ldld  $LIBS"
  2439. +cat > conftest.$ac_ext <<EOF
  2440. +#line 2294 "ltconfig"
  2441. +#include "confdefs.h"
  2442.  /* Override any gcc2 internal prototype to avoid an error.  */
  2443.  /* We use char because int might match the return type of a gcc2
  2444.      builtin and then its argument prototype would still apply.  */
  2445. -char LoadLibrary();
  2446. +char shl_load();
  2447.  
  2448.  int main() {
  2449. -
  2450. -/* The GNU C library defines this for functions which it implements
  2451. -    to always fail with ENOSYS.  Some functions are actually named
  2452. -    something starting with __ and the normal name is an alias.  */
  2453. -#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
  2454. -choke me
  2455. -#else
  2456. -LoadLibrary();
  2457. -#endif
  2458. -
  2459. +shl_load()
  2460.  ; return 0; }
  2461.  EOF
  2462. -if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2463. +if { (eval echo $progname:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2464.    rm -rf conftest*
  2465. -  eval "ac_cv_func_LoadLibrary=yes"
  2466. +  eval "ac_cv_lib_$ac_lib_var=yes"
  2467.  else
  2468.    echo "$progname: failed program was:" >&5
  2469.    cat conftest.$ac_ext >&5
  2470.    rm -rf conftest*
  2471. -  eval "ac_cv_func_LoadLibrary=no"
  2472. +  eval "ac_cv_lib_$ac_lib_var=no"
  2473.  fi
  2474.  rm -f conftest*
  2475. -fi
  2476. +LIBS="$ac_save_LIBS"
  2477.  
  2478. -if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
  2479. +fi
  2480. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2481.    echo "$ac_t""yes" 1>&6
  2482. -  lt_cv_dlopen="LoadLibrary"
  2483. +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  2484.  else
  2485.    echo "$ac_t""no" 1>&6
  2486.  fi
  2487.  
  2488. -      
  2489. +
  2490.  fi
  2491.  
  2492.      
  2493. @@ -2207,17 +2345,17 @@
  2494.  for ac_hdr in dlfcn.h; do
  2495.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2496.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2497. -echo "$progname:2210: checking for $ac_hdr" >&5
  2498. +echo "$progname:2348: checking for $ac_hdr" >&5
  2499.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2500.    echo $ac_n "(cached) $ac_c" 1>&6
  2501.  else
  2502.    cat > conftest.$ac_ext <<EOF
  2503. -#line 2215 "ltconfig"
  2504. +#line 2353 "ltconfig"
  2505.  #include <$ac_hdr>
  2506.  int fnord = 0;
  2507.  EOF
  2508.  ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
  2509. -{ (eval echo $progname:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2510. +{ (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2511.  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2512.  if test -z "$ac_err"; then
  2513.    rm -rf conftest*
  2514. @@ -2245,7 +2383,7 @@
  2515.      LIBS="$lt_cv_dlopen_libs $LIBS"
  2516.  
  2517.    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  2518. -echo "$progname:2248: checking whether a program can dlopen itself" >&5
  2519. +echo "$progname:2386: checking whether a program can dlopen itself" >&5
  2520.  if test "${lt_cv_dlopen_self+set}" = set; then
  2521.    echo $ac_n "(cached) $ac_c" 1>&6
  2522.  else
  2523. @@ -2253,7 +2391,7 @@
  2524.      lt_cv_dlopen_self=cross
  2525.    else
  2526.      cat > conftest.c <<EOF
  2527. -#line 2256 "ltconfig"
  2528. +#line 2394 "ltconfig"
  2529.  
  2530.  #if HAVE_DLFCN_H
  2531.  #include <dlfcn.h>
  2532. @@ -2299,7 +2437,7 @@
  2533.             if(ptr1 || ptr2) exit(0); } exit(1); } 
  2534.  
  2535.  EOF
  2536. -if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2537. +if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2538.  then
  2539.    lt_cv_dlopen_self=yes
  2540.  else
  2541. @@ -2318,7 +2456,7 @@
  2542.    if test "$lt_cv_dlopen_self" = yes; then
  2543.      LDFLAGS="$LDFLAGS $link_static_flag"
  2544.    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  2545. -echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
  2546. +echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5
  2547.  if test "${lt_cv_dlopen_self_static+set}" = set; then
  2548.    echo $ac_n "(cached) $ac_c" 1>&6
  2549.  else
  2550. @@ -2326,7 +2464,7 @@
  2551.      lt_cv_dlopen_self_static=cross
  2552.    else
  2553.      cat > conftest.c <<EOF
  2554. -#line 2329 "ltconfig"
  2555. +#line 2467 "ltconfig"
  2556.  
  2557.  #if HAVE_DLFCN_H
  2558.  #include <dlfcn.h>
  2559. @@ -2372,7 +2510,7 @@
  2560.      if(ptr1 || ptr2) exit(0); } exit(1); } 
  2561.  
  2562.  EOF
  2563. -if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2564. +if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2565.  then
  2566.    lt_cv_dlopen_self_static=yes
  2567.  else
  2568. @@ -2416,8 +2554,10 @@
  2569.  case "$ltmain" in
  2570.  *.sh)
  2571.    # Now quote all the things that may contain metacharacters.
  2572. -  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  2573. -    old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  2574. +  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
  2575. +    old_LD old_LDFLAGS old_LIBS \
  2576. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
  2577. +    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  2578.      reload_flag reload_cmds wl \
  2579.      pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  2580.      thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  2581. @@ -2497,8 +2637,9 @@
  2582.  
  2583.  *)
  2584.    # Double-quote the variables that need it (for aesthetics).
  2585. -  for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  2586. -    old_LN_S old_DLLTOOL old_AS; do
  2587. +  for var in old_CC old_CFLAGS old_CPPFLAGS \
  2588. +    old_LD old_LDFLAGS old_LIBS \
  2589. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
  2590.      eval "$var=\\\"\$var\\\""
  2591.    done
  2592.  
  2593. @@ -2518,8 +2659,9 @@
  2594.  # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2595.  #
  2596.  # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  2597. -# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  2598. -# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
  2599. +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  2600. +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  2601. +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
  2602.  #   $0$ltconfig_args
  2603.  #
  2604.  # Compiler and other test output produced by $progname, useful for
  2605. @@ -2565,6 +2707,9 @@
  2606.  # Used on cygwin: DLL creation program.
  2607.  DLLTOOL="$DLLTOOL"
  2608.  
  2609. +# Used on cygwin: object dumper.
  2610. +OBJDUMP="$OBJDUMP"
  2611. +
  2612.  # Used on cygwin: assembler.
  2613.  AS="$AS"
  2614.  
  2615. @@ -2587,7 +2732,7 @@
  2616.  # Additional compiler flags for building library objects.
  2617.  pic_flag=$pic_flag
  2618.  
  2619. -# Does compiler simultaneously support -c and -o options
  2620. +# Does compiler simultaneously support -c and -o options?
  2621.  compiler_c_o=$compiler_c_o
  2622.  
  2623.  # Can we write directly to a .lo ?
  2624. @@ -2657,7 +2802,7 @@
  2625.  # Method to check whether dependent libraries are shared objects.
  2626.  deplibs_check_method=$deplibs_check_method
  2627.  
  2628. -# Command to use when deplibs_check_method == file_magic
  2629. +# Command to use when deplibs_check_method == file_magic.
  2630.  file_magic_cmd=$file_magic_cmd
  2631.  
  2632.  # Flag that allows shared libraries with undefined symbols to be built.
  2633. @@ -2718,16 +2863,16 @@
  2634.  # Fix the shell variable \$srcfile for the compiler.
  2635.  fix_srcfile_path="$fix_srcfile_path"
  2636.  
  2637. -# Set to yes if exported symbols are required
  2638. +# Set to yes if exported symbols are required.
  2639.  always_export_symbols=$always_export_symbols
  2640.  
  2641. -# The command to extract exported symbols
  2642. +# The commands to list exported symbols.
  2643.  export_symbols_cmds=$export_symbols_cmds
  2644.  
  2645. -# Symbols that should not be listed in the preloaded symbols
  2646. +# Symbols that should not be listed in the preloaded symbols.
  2647.  exclude_expsyms=$exclude_expsyms
  2648.  
  2649. -# Symbols that must always be exported
  2650. +# Symbols that must always be exported.
  2651.  include_expsyms=$include_expsyms
  2652.  
  2653.  EOF
  2654. --- ./popt/popt.3    Tue Dec  1 17:28:41 1998
  2655. +++ ../ORBit-0.4.91/./popt/popt.3    Tue Jul  6 18:26:32 1999
  2656. @@ -118,7 +118,7 @@
  2657.  .sp
  2658.  .TS
  2659.  lfB lfB lfB
  2660. -lfB lfR lfR.
  2661. +lfB lfR lfR .
  2662.  Value    Description    arg Type
  2663.  POPT_ARG_NONE    No argument expected    int
  2664.  POPT_ARG_STRING    No type checking to be performed    char *
  2665. --- ./configure.in    Tue Jul  6 12:05:11 1999
  2666. +++ ../ORBit-0.4.91/./configure.in    Tue Jul  6 18:27:42 1999
  2667. @@ -311,7 +311,6 @@
  2668.  src/IIOP/Makefile
  2669.  src/orb/orbit.h
  2670.  src/orb/Makefile
  2671. -src/idl-compiler/Makefile
  2672.  src/orbit-idl-compiler/Makefile
  2673.  src/orbit-idl-compiler/backends/Makefile
  2674.  src/orbit-idl-compiler/backends/c/Makefile
  2675. --- ./libIDL/ltmain.sh    Tue Jul  6 10:33:51 1999
  2676. +++ ../ORBit-0.4.91/./libIDL/ltmain.sh    Tue Jul  6 18:28:44 1999
  2677. @@ -2,7 +2,7 @@
  2678.  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  2679.  #
  2680.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  2681. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2682. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2683.  #
  2684.  # This program is free software; you can redistribute it and/or modify
  2685.  # it under the terms of the GNU General Public License as published by
  2686. @@ -28,12 +28,8 @@
  2687.    # Discard the --no-reexec flag, and continue.
  2688.    shift
  2689.  elif test "X$1" = X--fallback-echo; then
  2690. -  # used as fallback echo
  2691. -  shift
  2692. -  cat <<EOF
  2693. -$*
  2694. -EOF
  2695. -  exit 0
  2696. +  # Avoid inline document here, it may be left over
  2697. +  :
  2698.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  2699.    # Yippee, $echo works!
  2700.    :
  2701. @@ -42,6 +38,15 @@
  2702.    exec $SHELL "$0" --no-reexec ${1+"$@"}
  2703.  fi
  2704.  
  2705. +if test "X$1" = X--fallback-echo; then
  2706. +  # used as fallback echo
  2707. +  shift
  2708. +  cat <<EOF
  2709. +$*
  2710. +EOF
  2711. +  exit 0
  2712. +fi
  2713. +
  2714.  # The name of this program.
  2715.  progname=`$echo "$0" | sed 's%^.*/%%'`
  2716.  modename="$progname"
  2717. @@ -49,8 +54,8 @@
  2718.  # Constants.
  2719.  PROGRAM=ltmain.sh
  2720.  PACKAGE=libtool
  2721. -VERSION=1.2f
  2722. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  2723. +VERSION=1.3.2
  2724. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  2725.  
  2726.  default_mode=
  2727.  help="Try \`$progname --help' for more information."
  2728. @@ -100,6 +105,7 @@
  2729.  show_help=
  2730.  execute_dlfiles=
  2731.  lo2o="s/\\.lo\$/.${objext}/"
  2732. +o2lo="s/\\.${objext}\$/.lo/"
  2733.  
  2734.  # Parse our command line options once, thoroughly.
  2735.  while test $# -gt 0
  2736. @@ -460,6 +466,7 @@
  2737.      command="$command -o $output_obj"
  2738.        fi
  2739.  
  2740. +      $run $rm "$output_obj"
  2741.        $show "$command"
  2742.        if $run eval "$command"; then :
  2743.        else
  2744. @@ -539,6 +546,7 @@
  2745.  
  2746.        # Suppress compiler output if we already did a PIC compilation.
  2747.        command="$command$suppress_output"
  2748. +      $run $rm "$output_obj"
  2749.        $show "$command"
  2750.        if $run eval "$command"; then :
  2751.        else
  2752. @@ -630,7 +638,13 @@
  2753.  # #undef WIN32_LEAN_AND_MEAN
  2754.  # #include <stdio.h>
  2755.  #
  2756. +# #ifdef __cplusplus
  2757. +# extern "C" {
  2758. +# #endif
  2759.  # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  2760. +# #ifdef __cplusplus
  2761. +# }
  2762. +# #endif
  2763.  #
  2764.  # #include <cygwin/cygwin_dll.h>
  2765.  # DECLARE_CYGWIN_DLL( DllMain );
  2766. @@ -815,6 +829,7 @@
  2767.      ltlibs=
  2768.      module=no
  2769.      objs=
  2770. +    prefer_static_libs=no
  2771.      preload=no
  2772.      prev=
  2773.      prevarg=
  2774. @@ -831,11 +846,21 @@
  2775.      do
  2776.        case "$arg" in
  2777.        -all-static | -static)
  2778. -    if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  2779. +    if test "X$arg" = "X-all-static"; then
  2780. +      if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  2781.          $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  2782. +      fi
  2783. +      if test -n "$link_static_flag"; then
  2784. +        dlopen_self=$dlopen_self_static
  2785. +      fi
  2786. +    else
  2787. +      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  2788. +        dlopen_self=$dlopen_self_static
  2789. +      fi
  2790.      fi
  2791.      build_libtool_libs=no
  2792.      build_old_libs=yes
  2793. +    prefer_static_libs=yes
  2794.      break
  2795.      ;;
  2796.        esac
  2797. @@ -873,13 +898,19 @@
  2798.            dlself=yes
  2799.          elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  2800.            dlself=yes
  2801. +        else
  2802. +          dlself=needless
  2803. +          export_dynamic=yes
  2804.          fi
  2805.          prev=
  2806.          continue
  2807.          ;;
  2808.        *)
  2809. -        dlprefiles="$dlprefiles $arg"
  2810. -        test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
  2811. +        if test "$prev" = dlfiles; then
  2812. +          dlfiles="$dlfiles $arg"
  2813. +        else
  2814. +          dlprefiles="$dlprefiles $arg"
  2815. +        fi
  2816.          prev=
  2817.          ;;
  2818.        esac
  2819. @@ -903,13 +934,26 @@
  2820.        prev=
  2821.        continue
  2822.        ;;
  2823. -    rpath)
  2824. -      rpath="$rpath $arg"
  2825. -      prev=
  2826. -      continue
  2827. -      ;;
  2828. -    xrpath)
  2829. -      xrpath="$xrpath $arg"
  2830. +    rpath | xrpath)
  2831. +      # We need an absolute path.
  2832. +      case "$arg" in
  2833. +      [\\/]* | [A-Za-z]:[\\/]*) ;;
  2834. +      *)
  2835. +        $echo "$modename: only absolute run-paths are allowed" 1>&2
  2836. +        exit 1
  2837. +        ;;
  2838. +      esac
  2839. +      if test "$prev" = rpath; then
  2840. +        case "$rpath " in
  2841. +        *" $arg "*) ;;
  2842. +        *) rpath="$rpath $arg" ;;
  2843. +        esac
  2844. +      else
  2845. +        case "$xrpath " in
  2846. +        *" $arg "*) ;;
  2847. +        *) xrpath="$xrpath $arg" ;;
  2848. +        esac
  2849. +      fi
  2850.        prev=
  2851.        continue
  2852.        ;;
  2853. @@ -928,7 +972,6 @@
  2854.      if test -n "$link_static_flag"; then
  2855.        compile_command="$compile_command $link_static_flag"
  2856.        finalize_command="$finalize_command $link_static_flag"
  2857. -      dlopen_self=$dlopen_self_static
  2858.      fi
  2859.      continue
  2860.      ;;
  2861. @@ -955,22 +998,16 @@
  2862.      ;;
  2863.  
  2864.        -export-dynamic)
  2865. -    if test "$export_dynamic" != yes; then
  2866. -      export_dynamic=yes
  2867. -      if test -n "$export_dynamic_flag_spec"; then
  2868. -        eval arg=\"$export_dynamic_flag_spec\"
  2869. -      else
  2870. -        arg=
  2871. -      fi
  2872. -    fi
  2873. +    export_dynamic=yes
  2874. +    continue
  2875.      ;;
  2876.  
  2877.        -export-symbols | -export-symbols-regex)
  2878.      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  2879. -      $echo "$modename: cannot have more than one -exported-symbols"
  2880. +      $echo "$modename: not more than one -exported-symbols argument allowed"
  2881.        exit 1
  2882.      fi
  2883. -    if test "$arg" = "-export-symbols"; then
  2884. +    if test "X$arg" = "X-export-symbols"; then
  2885.        prev=expsyms
  2886.      else
  2887.        prev=expsyms_regex
  2888. @@ -979,14 +1016,18 @@
  2889.      ;;
  2890.  
  2891.        -L*)
  2892. -    dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
  2893. +    dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  2894. +    # We need an absolute path.
  2895.      case "$dir" in
  2896. -    /* | [A-Za-z]:[/\\]*)
  2897. -      # Add the corresponding hardcode_libdir_flag, if it is not identical.
  2898. -      ;;
  2899. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  2900.      *)
  2901. -      $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
  2902. -      exit 1
  2903. +      absdir=`cd "$dir" && pwd`
  2904. +      if test -z "$absdir"; then
  2905. +        $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  2906. +        $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  2907. +        absdir="$dir"
  2908. +      fi
  2909. +      dir="$absdir"
  2910.        ;;
  2911.      esac
  2912.      case " $deplibs " in
  2913. @@ -1010,20 +1051,29 @@
  2914.      ;;
  2915.  
  2916.        -l*)
  2917. +    if test "$arg" = "-lc"; then
  2918. +      case "$host" in
  2919. +      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  2920. +        # These systems don't actually have c library (as such)
  2921. +        continue
  2922. +        ;;
  2923. +      esac
  2924. +    elif test "$arg" = "-lm"; then
  2925. +      case "$host" in
  2926. +      *-*-cygwin* | *-*-beos*)
  2927. +        # These systems don't actually have math library (as such)
  2928. +        continue
  2929. +        ;;
  2930. +      esac
  2931. +    fi
  2932.      deplibs="$deplibs $arg"
  2933.      ;;
  2934.  
  2935.        -module)
  2936. -    if test "$module" != yes; then
  2937. -      module=yes
  2938. -      if test -n "$export_dynamic_flag_spec"; then
  2939. -        eval arg=\"$export_dynamic_flag_spec\"
  2940. -      else
  2941. -        arg=
  2942. -      fi
  2943. -    fi
  2944. +    module=yes
  2945. +    continue
  2946.      ;;
  2947. -    
  2948. +
  2949.        -no-undefined)
  2950.      allow_undefined=no
  2951.      continue
  2952. @@ -1047,7 +1097,19 @@
  2953.      ;;
  2954.  
  2955.        -R*)
  2956. -    xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
  2957. +    dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  2958. +    # We need an absolute path.
  2959. +    case "$dir" in
  2960. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  2961. +    *)
  2962. +      $echo "$modename: only absolute run-paths are allowed" 1>&2
  2963. +      exit 1
  2964. +      ;;
  2965. +    esac
  2966. +    case "$xrpath " in
  2967. +    *" $dir "*) ;;
  2968. +    *) xrpath="$xrpath $dir" ;;
  2969. +    esac
  2970.      continue
  2971.      ;;
  2972.  
  2973. @@ -1056,7 +1118,6 @@
  2974.      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  2975.        compile_command="$compile_command $link_static_flag"
  2976.        finalize_command="$finalize_command $link_static_flag"
  2977. -      dlopen_self=$dlopen_self_static
  2978.      fi
  2979.      continue
  2980.      ;;
  2981. @@ -1128,6 +1189,7 @@
  2982.      # it will not redefine variable installed.
  2983.      installed=yes
  2984.  
  2985. +    # Read the .la file
  2986.      # If there is no directory component, then add one.
  2987.      case "$arg" in
  2988.      */* | *\\*) . $arg ;;
  2989. @@ -1218,7 +1280,8 @@
  2990.        prev=
  2991.      fi
  2992.  
  2993. -    if test "$build_libtool_libs" = yes && test -n "$library_names"; then
  2994. +    if test -n "$library_names" &&
  2995. +       { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  2996.        link_against_libtool_libs="$link_against_libtool_libs $arg"
  2997.        if test -n "$shlibpath_var"; then
  2998.          # Make sure the rpath contains only unique directories.
  2999. @@ -1230,12 +1293,13 @@
  3000.  
  3001.        # We need an absolute path.
  3002.        case "$dir" in
  3003. -      /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
  3004. +      [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  3005.        *)
  3006.          absdir=`cd "$dir" && pwd`
  3007.          if test -z "$absdir"; then
  3008. -          $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
  3009. -          exit 1
  3010. +          $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  3011. +          $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  3012. +          absdir="$dir"
  3013.          fi
  3014.          ;;
  3015.        esac
  3016. @@ -1244,7 +1308,7 @@
  3017.        # Skip directories that are in the system default run-time
  3018.        # search path, unless they have been requested with -R.
  3019.        case " $sys_lib_dlsearch_path " in
  3020. -       *" $absdir "*) ;;
  3021. +      *" $absdir "*) ;;
  3022.        *)
  3023.          case "$compile_rpath " in
  3024.          *" $absdir "*) ;;
  3025. @@ -1251,10 +1315,10 @@
  3026.          *) compile_rpath="$compile_rpath $absdir" 
  3027.          esac
  3028.          ;;
  3029. -       esac
  3030. +      esac
  3031.  
  3032.        case " $sys_lib_dlsearch_path " in
  3033. -       *" $libdir "*) ;;
  3034. +      *" $libdir "*) ;;
  3035.        *)
  3036.          case "$finalize_rpath " in
  3037.          *" $libdir "*) ;;
  3038. @@ -1261,7 +1325,7 @@
  3039.          *) finalize_rpath="$finalize_rpath $libdir"
  3040.          esac
  3041.          ;;
  3042. -       esac
  3043. +      esac
  3044.  
  3045.        lib_linked=yes
  3046.        case "$hardcode_action" in
  3047. @@ -1419,6 +1483,12 @@
  3048.        exit 1
  3049.      fi
  3050.  
  3051. +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  3052. +      eval arg=\"$export_dynamic_flag_spec\"
  3053. +      compile_command="$compile_command $arg"
  3054. +      finalize_command="$finalize_command $arg"
  3055. +    fi
  3056. +
  3057.      oldlibs=
  3058.      # calculate the name of the file, without its directory
  3059.      outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  3060. @@ -1441,7 +1511,7 @@
  3061.      $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  3062.        fi
  3063.  
  3064. -      if test -n "$dlfiles$dlprefiles"; then
  3065. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3066.      $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  3067.        fi
  3068.  
  3069. @@ -1461,7 +1531,7 @@
  3070.      $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  3071.        fi
  3072.  
  3073. -      if test -n "$export_symbols"; then
  3074. +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  3075.      $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  3076.        fi
  3077.  
  3078. @@ -1500,11 +1570,6 @@
  3079.      output_objdir="$output_objdir/$objdir"
  3080.        fi
  3081.  
  3082. -      # All the library-specific variables (install_libdir is set above).
  3083. -      library_names=
  3084. -      old_library=
  3085. -      dlname=
  3086. -
  3087.        if test -n "$objs"; then
  3088.      $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
  3089.      exit 1
  3090. @@ -1516,7 +1581,7 @@
  3091.       exit 1
  3092.        fi
  3093.  
  3094. -      if test -n "$dlfiles$dlprefiles"; then
  3095. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3096.      $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
  3097.        fi
  3098.  
  3099. @@ -1699,7 +1764,7 @@
  3100.  
  3101.      dependency_libs="$deplibs"
  3102.      case "$host" in
  3103. -    *-*-cygwin* | *-*-mingw* | *-*-os2*)
  3104. +    *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  3105.        # these systems don't actually have a c library (as such)!
  3106.        ;;
  3107.      *)
  3108. @@ -1747,12 +1812,13 @@
  3109.      droppeddeps=no
  3110.      case "$deplibs_check_method" in
  3111.      pass_all)
  3112. +      # Don't check for shared/static.  Everything works.
  3113. +      # This might be a little naive.  We might want to check
  3114. +      # whether the library exists or not.  But this is on
  3115. +      # osf3 & osf4 and I'm not really sure... Just
  3116. +      # implementing what was already the behaviour.
  3117.        newdeplibs=$deplibs
  3118. -            ;; # Don't check for shared/static.  Everything works.
  3119. -               # This might be a little naive.  We might want to check
  3120. -               # whether the library exists or not.  But this is on
  3121. -               # osf3 & osf4 and I'm not really sure... Just
  3122. -               # implementing what was already the behaviour.
  3123. +      ;;
  3124.      test_compile)
  3125.        # This code stresses the "libraries are programs" paradigm to its
  3126.        # limits. Maybe even breaks it.  We compile a program, linking it
  3127. @@ -1800,20 +1866,20 @@
  3128.          # Did it work?
  3129.          if test $? -eq 0 ; then
  3130.            ldd_output=`ldd conftest`
  3131. -            libname=`eval \\$echo \"$libname_spec\"`
  3132. -            deplib_matches=`eval \\$echo \"$library_names_spec\"`
  3133. -            set dummy $deplib_matches
  3134. -            deplib_match=$2
  3135. -            if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  3136. -              newdeplibs="$newdeplibs $i"
  3137. -            else
  3138. -              droppeddeps=yes
  3139. -              echo
  3140. -              echo "*** Warning: This library needs some functionality provided by $i."
  3141. -              echo "*** I have the capability to make that library automatically link in when"
  3142. -              echo "*** you link to this library.  But I can only do this if you have a"
  3143. -              echo "*** shared version of the library, which you do not appear to have."
  3144. -            fi
  3145. +          libname=`eval \\$echo \"$libname_spec\"`
  3146. +          deplib_matches=`eval \\$echo \"$library_names_spec\"`
  3147. +          set dummy $deplib_matches
  3148. +          deplib_match=$2
  3149. +          if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  3150. +            newdeplibs="$newdeplibs $i"
  3151. +          else
  3152. +            droppeddeps=yes
  3153. +            echo
  3154. +            echo "*** Warning: This library needs some functionality provided by $i."
  3155. +            echo "*** I have the capability to make that library automatically link in when"
  3156. +            echo "*** you link to this library.  But I can only do this if you have a"
  3157. +            echo "*** shared version of the library, which you do not appear to have."
  3158. +          fi
  3159.          else
  3160.            droppeddeps=yes
  3161.            echo
  3162. @@ -1827,7 +1893,6 @@
  3163.            fi
  3164.          done
  3165.        fi
  3166. -      deplibs=$newdeplibs
  3167.        ;;
  3168.      file_magic*)
  3169.        set dummy $deplibs_check_method
  3170. @@ -1841,7 +1906,7 @@
  3171.              potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  3172.              for potent_lib in $potential_libs; do
  3173.                # Follow soft links.
  3174. -              if ls -lLd "$potlib" 2>/dev/null \
  3175. +              if ls -lLd "$potent_lib" 2>/dev/null \
  3176.               | grep " -> " >/dev/null; then
  3177.              continue 
  3178.                fi
  3179. @@ -1854,11 +1919,11 @@
  3180.                while test -h "$potlib" 2>/dev/null; do
  3181.              potliblink=`ls -ld $potlib | sed 's/.* -> //'`
  3182.              case "$potliblink" in
  3183. -            /*) potlib="$potliblink";;
  3184. +            [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  3185.              *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  3186.              esac
  3187.                done
  3188. -              if eval $file_magic_cmd \"\$potlib\" \
  3189. +              if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  3190.               | sed 10q \
  3191.               | egrep "$file_magic_regex" > /dev/null; then
  3192.              newdeplibs="$newdeplibs $a_deplib"
  3193. @@ -1881,7 +1946,8 @@
  3194.          fi
  3195.        done # Gone through all deplibs.
  3196.        ;;
  3197. -    none | unknown | *) newdeplibs=""
  3198. +    none | unknown | *)
  3199. +      newdeplibs=""
  3200.        if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  3201.             -e 's/ -[LR][^ ]*//g' -e 's/[     ]//g' |
  3202.           grep . >/dev/null; then
  3203. @@ -1923,8 +1989,6 @@
  3204.          else
  3205.            build_libtool_libs=no
  3206.          fi
  3207. -        dlname=
  3208. -        library_names=
  3209.        else
  3210.          echo "*** The inter-library dependencies that have been dropped here will be"
  3211.          echo "*** automatically added whenever a program is linked with this library"
  3212. @@ -1931,13 +1995,17 @@
  3213.          echo "*** or is declared to -dlopen it."
  3214.        fi
  3215.      fi
  3216. +    # Done checking deplibs!
  3217. +    deplibs=$newdeplibs
  3218.        fi
  3219.  
  3220. -      # test again, we may have decided not to build it any more
  3221. +      # All the library-specific variables (install_libdir is set above).
  3222. +      library_names=
  3223. +      old_library=
  3224. +      dlname=
  3225. +      
  3226. +      # Test again, we may have decided not to build it any more
  3227.        if test "$build_libtool_libs" = yes; then
  3228. -    deplibs=$newdeplibs
  3229. -    # Done checking deplibs!
  3230.      # Get the real and link names of the library.
  3231.      eval library_names=\"$library_names_spec\"
  3232.      set dummy $library_names
  3233. @@ -1960,7 +2028,10 @@
  3234.      # (e.g. aix) incase we are running --disable-static
  3235.      for obj in $libobjs; do
  3236.        oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
  3237. -      test -f $oldobj || ${LN_S} $obj $oldobj
  3238. +      if test ! -f $oldobj; then
  3239. +        $show "${LN_S} $obj $oldobj"
  3240. +        $run ${LN_S} $obj $oldobj || exit $?
  3241. +      fi
  3242.      done
  3243.  
  3244.      # Use standard objects if they are pic
  3245. @@ -1971,11 +2042,25 @@
  3246.          eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  3247.        fi
  3248.      else
  3249. +      gentop="$output_objdir/${outputname}x"
  3250. +      $show "${rm}r $gentop"
  3251. +      $run ${rm}r "$gentop"
  3252. +      $show "mkdir $gentop"
  3253. +      $run mkdir "$gentop"
  3254. +      status=$?
  3255. +      if test $status -ne 0 && test ! -d "$gentop"; then
  3256. +        exit $status
  3257. +      fi
  3258. +      generated="$generated $gentop"
  3259. +      
  3260.        for xlib in $convenience; do
  3261.          # Extract the objects.
  3262. -        xdir="$xlib"x
  3263. -        generated="$generated $xdir"
  3264. +        case "$xlib" in
  3265. +        [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3266. +        *) xabs=`pwd`"/$xlib" ;;
  3267. +        esac
  3268.          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3269. +        xdir="$gentop/$xlib"
  3270.  
  3271.          $show "${rm}r $xdir"
  3272.          $run ${rm}r "$xdir"
  3273. @@ -1985,8 +2070,8 @@
  3274.          if test $status -ne 0 && test ! -d "$xdir"; then
  3275.            exit $status
  3276.          fi
  3277. -        $show "(cd $xdir && $AR x ../$xlib)"
  3278. -        $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  3279. +        $show "(cd $xdir && $AR x $xabs)"
  3280. +        $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3281.  
  3282.          libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  3283.        done
  3284. @@ -1994,7 +2079,6 @@
  3285.  
  3286.      if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  3287.        eval flag=\"$thread_safe_flag_spec\"
  3288. -
  3289.        linkopts="$linkopts $flag"
  3290.      fi
  3291.  
  3292. @@ -2002,7 +2086,7 @@
  3293.      if test -z "$export_symbols"; then
  3294.        if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  3295.          $show "generating symbol list for \`$libname.la'"
  3296. -        export_symbols="$objdir/$libname.exp"
  3297. +        export_symbols="$output_objdir/$libname.exp"
  3298.          $run $rm $export_symbols
  3299.          eval cmds=\"$export_symbols_cmds\"
  3300.          IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  3301. @@ -2065,7 +2149,7 @@
  3302.      $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  3303.        fi
  3304.  
  3305. -      if test -n "$dlfiles$dlprefiles"; then
  3306. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  3307.      $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  3308.        fi
  3309.  
  3310. @@ -2167,11 +2251,6 @@
  3311.      fi 
  3312.        fi
  3313.      
  3314. -      if test "$dlself" = yes && test "$export_dynamic" = no; then
  3315. -    $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
  3316. -    exit 1
  3317. -      fi
  3318. -
  3319.        if test -n "$rpath$xrpath"; then
  3320.      # If the user specified any rpath flags, then add them.
  3321.      for libdir in $rpath $xrpath; do
  3322. @@ -2207,7 +2286,6 @@
  3323.          fi
  3324.        else
  3325.          eval flag=\"$hardcode_libdir_flag_spec\"
  3326. -
  3327.          rpath="$rpath $flag"
  3328.        fi
  3329.      elif test -n "$runpath_var"; then
  3330. @@ -2244,7 +2322,6 @@
  3331.          fi
  3332.        else
  3333.          eval flag=\"$hardcode_libdir_flag_spec\"
  3334. -
  3335.          rpath="$rpath $flag"
  3336.        fi
  3337.      elif test -n "$runpath_var"; then
  3338. @@ -2269,6 +2346,16 @@
  3339.      output_objdir="$output_objdir/$objdir"
  3340.        fi
  3341.  
  3342. +      # Create the binary in the object directory, then wrap it.
  3343. +      if test ! -d $output_objdir; then
  3344. +    $show "$mkdir $output_objdir"
  3345. +    $run $mkdir $output_objdir
  3346. +    status=$?
  3347. +    if test $status -ne 0 && test ! -d $output_objdir; then
  3348. +      exit $status
  3349. +    fi
  3350. +      fi
  3351. +
  3352.        if test -n "$libobjs" && test "$build_old_libs" = yes; then
  3353.      # Transform all the library objects into standard objects.
  3354.      compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3355. @@ -2289,24 +2376,15 @@
  3356.      "") ;;
  3357.      *.c)
  3358.        # Discover the nlist of each of the dlfiles.
  3359. -      nlist="$objdir/${output}.nm"
  3360. +      nlist="$output_objdir/${outputname}.nm"
  3361.  
  3362. -      if test -d $objdir; then
  3363. -        $show "$rm $nlist ${nlist}S ${nlist}T"
  3364. -        $run $rm "$nlist" "${nlist}S" "${nlist}T"
  3365. -      else
  3366. -        $show "$mkdir $objdir"
  3367. -        $run $mkdir $objdir
  3368. -        status=$?
  3369. -        if test $status -ne 0 && test ! -d $objdir; then
  3370. -          exit $status
  3371. -        fi
  3372. -      fi
  3373. +      $show "$rm $nlist ${nlist}S ${nlist}T"
  3374. +      $run $rm "$nlist" "${nlist}S" "${nlist}T"
  3375.  
  3376.        # Parse the name list into a source file.
  3377. -      $show "creating $objdir/$dlsyms"
  3378. +      $show "creating $output_objdir/$dlsyms"
  3379.  
  3380. -      $echo > "$objdir/$dlsyms" "\
  3381. +      test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  3382.  /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  3383.  /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  3384.  
  3385. @@ -2323,7 +2401,7 @@
  3386.        if test "$dlself" = yes; then
  3387.          $show "generating symbol list for \`$output'"
  3388.  
  3389. -        echo ': @PROGRAM@ ' > "$nlist"
  3390. +        test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  3391.  
  3392.          # Add our own program objects to the symbol list.
  3393.          progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  3394. @@ -2344,13 +2422,12 @@
  3395.  
  3396.          # Prepare the list of exported symbols
  3397.          if test -z "$export_symbols"; then
  3398. -          export_symbols="$objdir/$output.exp"
  3399. +          export_symbols="$output_objdir/$output.exp"
  3400.            $run $rm $export_symbols
  3401.            $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  3402.          else
  3403. -          $run $rm $export_symbols
  3404. -          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
  3405. -          $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
  3406. +          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  3407. +          $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  3408.            $run eval 'mv "$nlist"T "$nlist"'
  3409.          fi
  3410.        fi
  3411. @@ -2426,7 +2503,7 @@
  3412.        fi
  3413.  
  3414.        pic_flag_for_symtable=
  3415. -          case "$host" in
  3416. +      case "$host" in
  3417.        # compiling the symbol table file with pic_flag works around
  3418.        # a FreeBSD bug that causes programs to crash when -lm is
  3419.        # linked before any other PIC object.  But we must not use
  3420. @@ -2440,12 +2517,16 @@
  3421.        esac
  3422.  
  3423.        # Now compile the dynamic symbol file.
  3424. -      $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  3425. -      $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  3426. +      $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  3427. +      $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  3428. +
  3429. +      # Clean up the generated files.
  3430. +      $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  3431. +      $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  3432.  
  3433.        # Transform the symbol file into the correct name.
  3434. -      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  3435. -      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  3436. +      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  3437. +      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  3438.        ;;
  3439.      *)
  3440.        $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  3441. @@ -2470,7 +2551,15 @@
  3442.      # We have no uninstalled library dependencies, so finalize right now.
  3443.      $show "$link_command"
  3444.      $run eval "$link_command"
  3445. -    exit $?
  3446. +    status=$?
  3447. +    
  3448. +    # Delete the generated files.
  3449. +    if test -n "$dlsyms"; then
  3450. +      $show "$rm $output_objdir/${outputname}S.${objext}"
  3451. +      $run $rm "$output_objdir/${outputname}S.${objext}"
  3452. +    fi
  3453. +
  3454. +    exit $status
  3455.        fi
  3456.  
  3457.        if test -n "$shlibpath_var"; then
  3458. @@ -2478,7 +2567,7 @@
  3459.      rpath=
  3460.      for dir in $temp_rpath; do
  3461.        case "$dir" in
  3462. -      /* | [A-Za-z]:[/\\]*)
  3463. +      [\\/]* | [A-Za-z]:[\\/]*)
  3464.          # Absolute path.
  3465.          rpath="$rpath$dir:"
  3466.          ;;
  3467. @@ -2524,7 +2613,6 @@
  3468.      link_command="$compile_var$compile_command$compile_rpath"
  3469.      relink_command="$finalize_var$finalize_command$finalize_rpath"
  3470.      
  3471. -    # AGH! Flame the AIX and HP-UX people for me, will ya?
  3472.      $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  3473.      $echo "$modename: \`$output' will be relinked during installation" 1>&2
  3474.        else
  3475. @@ -2545,17 +2633,7 @@
  3476.        # Replace the output file specification.
  3477.        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  3478.        
  3479. -      # Create the binary in the object directory, then wrap it.
  3480. -      if test ! -d $output_objdir; then
  3481. -    $show "$mkdir $output_objdir"
  3482. -    $run $mkdir $output_objdir
  3483. -    status=$?
  3484. -    if test $status -ne 0 && test ! -d $objdir; then
  3485. -      exit $status
  3486. -    fi
  3487. -      fi
  3488. -
  3489. -      # Delete the old output file.
  3490. +      # Delete the old output files.
  3491.        $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  3492.  
  3493.        $show "$link_command"
  3494. @@ -2572,7 +2650,7 @@
  3495.        # Quote $echo for shipping.
  3496.        if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  3497.      case "$0" in
  3498. -    /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
  3499. +    [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  3500.      *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
  3501.      esac
  3502.      qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  3503. @@ -2649,7 +2727,7 @@
  3504.      # If there was a directory component, then change thisdir.
  3505.      if test \"x\$destdir\" != \"x\$file\"; then
  3506.        case \"\$destdir\" in
  3507. -      /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
  3508. +      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
  3509.        *) thisdir=\"\$thisdir/\$destdir\" ;;
  3510.        esac
  3511.      fi
  3512. @@ -2787,31 +2865,58 @@
  3513.      addlibs="$old_convenience"
  3514.        fi
  3515.  
  3516. -      # Add in members from convenience archives.
  3517. -      for xlib in $addlibs; do
  3518. -    # Extract the objects.
  3519. -    xdir="$xlib"x
  3520. -    generated="$generated $xdir"
  3521. -    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3522. -
  3523. -    $show "${rm}r $xdir"
  3524. -    $run ${rm}r "$xdir"
  3525. -    $show "mkdir $xdir"
  3526. -    $run mkdir "$xdir"
  3527. +      if test -n "$addlibs"; then
  3528. +    gentop="$output_objdir/${outputname}x"
  3529. +    $show "${rm}r $gentop"
  3530. +    $run ${rm}r "$gentop"
  3531. +    $show "mkdir $gentop"
  3532. +    $run mkdir "$gentop"
  3533.      status=$?
  3534. -    if test $status -ne 0 && test ! -d "$xdir"; then
  3535. +    if test $status -ne 0 && test ! -d "$gentop"; then
  3536.        exit $status
  3537.      fi
  3538. -    $show "(cd $xdir && $AR x ../$xlib)"
  3539. -    $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  3540. +    generated="$generated $gentop"
  3541. +      
  3542. +    # Add in members from convenience archives.
  3543. +    for xlib in $addlibs; do
  3544. +      # Extract the objects.
  3545. +      case "$xlib" in
  3546. +      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  3547. +      *) xabs=`pwd`"/$xlib" ;;
  3548. +      esac
  3549. +      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  3550. +      xdir="$gentop/$xlib"
  3551.  
  3552. -    oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  3553. -      done
  3554. +      $show "${rm}r $xdir"
  3555. +      $run ${rm}r "$xdir"
  3556. +      $show "mkdir $xdir"
  3557. +      $run mkdir "$xdir"
  3558. +      status=$?
  3559. +      if test $status -ne 0 && test ! -d "$xdir"; then
  3560. +        exit $status
  3561. +      fi
  3562. +      $show "(cd $xdir && $AR x $xabs)"
  3563. +      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  3564. +
  3565. +      oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  3566. +    done
  3567. +      fi
  3568.  
  3569.        # Do each command in the archive commands.
  3570.        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  3571.      eval cmds=\"$old_archive_from_new_cmds\"
  3572.        else
  3573. +    # Ensure that we have .o objects in place incase we decided
  3574. +    # not to build a shared library, and have fallen back to building
  3575. +    # static libs even though --disable-static was passed!
  3576. +    for oldobj in $oldobjs; do
  3577. +      if test ! -f $oldobj; then
  3578. +        obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
  3579. +        $show "${LN_S} $obj $oldobj"
  3580. +        $run ${LN_S} $obj $oldobj || exit $?
  3581. +      fi
  3582. +    done
  3583. +
  3584.      eval cmds=\"$old_archive_cmds\"
  3585.        fi
  3586.        IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  3587. @@ -2845,9 +2950,20 @@
  3588.  
  3589.        # Only create the output if not a dry run.
  3590.        if test -z "$run"; then
  3591. -    $echo > $output "\
  3592. -# $output - a libtool library file
  3593. +    for installed in no yes; do
  3594. +      if test "$installed" = yes; then
  3595. +        if test -z "$install_libdir"; then
  3596. +          break
  3597. +        fi
  3598. +        output="$output_objdir/$outputname"i
  3599. +      fi
  3600. +      $rm $output
  3601. +      $echo > $output "\
  3602. +# $outputname - a libtool library file
  3603.  # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  3604. +#
  3605. +# Please DO NOT delete this file!
  3606. +# It is necessary for linking the library.
  3607.  
  3608.  # The name that we can dlopen(3).
  3609.  dlname='$dlname'
  3610. @@ -2867,15 +2983,12 @@
  3611.  revision=$revision
  3612.  
  3613.  # Is this an already installed library?
  3614. -installed=no
  3615. +installed=$installed
  3616.  
  3617.  # Directory that this library needs to be installed in:
  3618.  libdir='$install_libdir'\
  3619.  "
  3620. -
  3621. -    $rm "$output_objdir/$outputname"i
  3622. -    sed 's/^installed=no$/installed=yes/' \
  3623. -      < "$output" > "$output_objdir/$outputname"i || exit 1
  3624. +    done
  3625.        fi
  3626.  
  3627.        # Do a symbolic link so that the libtool archive can be found in
  3628. @@ -3012,7 +3125,7 @@
  3629.        fi
  3630.      fi
  3631.      case "$destdir" in
  3632. -    /* | [A-Za-z]:[/\\]*) ;;
  3633. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  3634.      *)
  3635.        for file in $files; do
  3636.      case "$file" in
  3637. @@ -3123,12 +3236,6 @@
  3638.      # Install the pseudo-library for information purposes.
  3639.      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  3640.      instname="$dir/$name"i
  3641. -    if test ! -f "$instname"; then
  3642. -      # Just in case it was removed...
  3643. -      $show "Creating $instname"
  3644. -      $rm "$instname"
  3645. -      sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
  3646. -    fi
  3647.      $show "$install_prog $instname $destdir/$name"
  3648.      $run eval "$install_prog $instname $destdir/$name" || exit $?
  3649.  
  3650. @@ -3226,21 +3333,29 @@
  3651.  
  3652.        outputname=
  3653.        if test "$fast_install" = no && test -n "$relink_command"; then
  3654. -        if test "$finalize" = yes; then
  3655. -          outputname="/tmp/$$-$file"
  3656. +        if test "$finalize" = yes && test -z "$run"; then
  3657. +          tmpdir="/tmp"
  3658. +          test -n "$TMPDIR" && tmpdir="$TMPDIR"
  3659. +          tmpdir="$tmpdir/libtool-$$"
  3660. +          if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
  3661. +          else
  3662. +        $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  3663. +        continue
  3664. +          fi
  3665. +          outputname="$tmpdir/$file"
  3666.            # Replace the output file specification.
  3667.            relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  3668.  
  3669. -          $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
  3670.            $show "$relink_command"
  3671.            if $run eval "$relink_command"; then :
  3672.            else
  3673.          $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  3674. +        ${rm}r "$tmpdir"
  3675.          continue
  3676.            fi
  3677.            file="$outputname"
  3678.          else
  3679. -          $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
  3680. +          $echo "$modename: warning: cannot relink \`$file'" 1>&2
  3681.          fi
  3682.        else
  3683.          # Install the binary that we compiled earlier.
  3684. @@ -3250,7 +3365,7 @@
  3685.  
  3686.      $show "$install_prog$stripme $file $destfile"
  3687.      $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  3688. -    test -n "$outputname" && $rm $outputname
  3689. +    test -n "$outputname" && ${rm}r "$tmpdir"
  3690.      ;;
  3691.        esac
  3692.      done
  3693. @@ -3718,6 +3833,8 @@
  3694.    -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  3695.    -export-symbols SYMFILE
  3696.              try to export only the symbols listed in SYMFILE
  3697. +  -export-symbols-regex REGEX
  3698. +            try to export only the symbols matching REGEX
  3699.    -LLIBDIR          search LIBDIR for required installed libraries
  3700.    -lNAME            OUTPUT-FILE requires the installed library libNAME
  3701.    -module           build a library that can dlopened
  3702. @@ -3748,7 +3865,7 @@
  3703.    ;;
  3704.  
  3705.  uninstall)
  3706. -  $echo
  3707. +  $echo \
  3708.  "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  3709.  
  3710.  Remove libraries from an installation directory.
  3711. --- ./libIDL/ltconfig    Tue Jul  6 10:33:51 1999
  3712. +++ ../ORBit-0.4.91/./libIDL/ltconfig    Tue Jul  6 18:28:55 1999
  3713. @@ -2,7 +2,7 @@
  3714.  
  3715.  # ltconfig - Create a system-specific libtool.
  3716.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  3717. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3718. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3719.  #
  3720.  # This file is free software; you can redistribute it and/or modify it
  3721.  # under the terms of the GNU General Public License as published by
  3722. @@ -32,12 +32,8 @@
  3723.    # Discard the --no-reexec flag, and continue.
  3724.    shift
  3725.  elif test "X$1" = X--fallback-echo; then
  3726. -  # used as fallback echo
  3727. -  shift
  3728. -  cat <<EOF
  3729. -$*
  3730. -EOF
  3731. -  exit 0
  3732. +  # Avoid inline document here, it may be left over
  3733. +  :
  3734.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  3735.    # Yippee, $echo works!
  3736.    :
  3737. @@ -46,6 +42,15 @@
  3738.    exec "$SHELL" "$0" --no-reexec ${1+"$@"}
  3739.  fi
  3740.  
  3741. +if test "X$1" = X--fallback-echo; then
  3742. +  # used as fallback echo
  3743. +  shift
  3744. +  cat <<EOF
  3745. +$*
  3746. +EOF
  3747. +  exit 0
  3748. +fi
  3749. +
  3750.  # Find the correct PATH separator.  Usually this is `:', but
  3751.  # DJGPP uses `;' like DOS.
  3752.  if test "X${PATH_SEPARATOR+set}" != "Xset"; then
  3753. @@ -82,7 +87,7 @@
  3754.  
  3755.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  3756.    for dir in $PATH /usr/ucb; do
  3757. -    if test -f $dir/echo &&
  3758. +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  3759.         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  3760.         test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  3761.        echo="$dir/echo"
  3762. @@ -97,7 +102,8 @@
  3763.         test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  3764.        # This shell has a builtin print -r that does the trick.
  3765.        echo='print -r'
  3766. -    elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
  3767. +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  3768. +     test "X$CONFIG_SHELL" != X/bin/ksh; then
  3769.        # If we have ksh, try running ltconfig again with it.
  3770.        ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  3771.        export ORIGINAL_CONFIG_SHELL
  3772. @@ -163,8 +169,8 @@
  3773.  # Constants:
  3774.  PROGRAM=ltconfig
  3775.  PACKAGE=libtool
  3776. -VERSION=1.2f
  3777. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  3778. +VERSION=1.3.2
  3779. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  3780.  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
  3781.  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
  3782.  rm="rm -f"
  3783. @@ -179,6 +185,7 @@
  3784.  enable_static=yes
  3785.  enable_fast_install=yes
  3786.  enable_dlopen=unknown
  3787. +enable_win32_dll=no
  3788.  ltmain=
  3789.  silent=
  3790.  srcdir=
  3791. @@ -200,11 +207,14 @@
  3792.  old_CC="$CC"
  3793.  old_CFLAGS="$CFLAGS"
  3794.  old_CPPFLAGS="$CPPFLAGS"
  3795. +old_LDFLAGS="$LDFLAGS"
  3796.  old_LD="$LD"
  3797.  old_LN_S="$LN_S"
  3798. +old_LIBS="$LIBS"
  3799.  old_NM="$NM"
  3800.  old_RANLIB="$RANLIB"
  3801.  old_DLLTOOL="$DLLTOOL"
  3802. +old_OBJDUMP="$OBJDUMP"
  3803.  old_AS="$AS"
  3804.  
  3805.  # Parse the command line options.
  3806. @@ -235,7 +245,7 @@
  3807.      --disable-static       do not build static libraries
  3808.      --disable-fast-install do not optimize for fast installation
  3809.      --enable-dlopen        enable dlopen support
  3810. -    --enable-dlopen-self   enable support for dlopening programs
  3811. +    --enable-win32-dll     enable building dlls on win32 hosts
  3812.      --help                 display this help and exit
  3813.      --no-verify            do not verify that HOST is a valid host type
  3814.  -o, --output=FILE          specify the output file [default=$default_ofile]
  3815. @@ -269,6 +279,8 @@
  3816.  
  3817.    --enable-dlopen) enable_dlopen=yes ;;
  3818.  
  3819. +  --enable-win32-dll) enable_win32_dll=yes ;;
  3820. +
  3821.    --quiet | --silent) silent=yes ;;
  3822.  
  3823.    --srcdir) prev=srcdir ;;
  3824. @@ -463,6 +475,9 @@
  3825.  # Set a sane default for `AR'.
  3826.  test -z "$AR" && AR=ar
  3827.  
  3828. +# Set a sane default for `OBJDUMP'.
  3829. +test -z "$OBJDUMP" && OBJDUMP=objdump
  3830. +
  3831.  # If RANLIB is not set, then run the test.
  3832.  if test "${RANLIB+set}" != "set"; then
  3833.    result=no
  3834. @@ -471,7 +486,7 @@
  3835.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  3836.    for dir in $PATH; do
  3837.      test -z "$dir" && dir=.
  3838. -    if test -f $dir/ranlib; then
  3839. +    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
  3840.        RANLIB="ranlib"
  3841.        result="ranlib"
  3842.        break
  3843. @@ -487,8 +502,9 @@
  3844.    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  3845.  fi
  3846.  
  3847. -# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
  3848. +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
  3849.  test -z "$DLLTOOL" && DLLTOOL=dlltool
  3850. +test -z "$OBJDUMP" && OBJDUMP=objdump
  3851.  test -z "$AS" && AS=as
  3852.  
  3853.  # Check to see if we are using GCC.
  3854. @@ -498,9 +514,8 @@
  3855.      echo $ac_n "checking for gcc... $ac_c" 1>&6
  3856.      IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  3857.      for dir in $PATH; do
  3858. -      IFS="$save_ifs"
  3859.        test -z "$dir" && dir=.
  3860. -      if test -f $dir/gcc; then
  3861. +      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
  3862.      CC="gcc"
  3863.      break
  3864.        fi
  3865. @@ -521,7 +536,7 @@
  3866.      cc_rejected=no
  3867.      for dir in $PATH; do
  3868.        test -z "$dir" && dir=.
  3869. -      if test -f $dir/cc; then
  3870. +      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
  3871.      if test "$dir/cc" = "/usr/ucb/cc"; then
  3872.        cc_rejected=yes
  3873.        continue
  3874. @@ -561,7 +576,7 @@
  3875.    # Now see if the compiler is really GCC.
  3876.    with_gcc=no
  3877.    echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
  3878. -  echo "$progname:564: checking whether we are using GNU C" >&5
  3879. +  echo "$progname:579: checking whether we are using GNU C" >&5
  3880.  
  3881.    $rm conftest.c
  3882.    cat > conftest.c <<EOF
  3883. @@ -569,7 +584,7 @@
  3884.    yes;
  3885.  #endif
  3886.  EOF
  3887. -  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  3888. +  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  3889.      with_gcc=yes
  3890.    fi
  3891.    $rm conftest.c
  3892. @@ -583,8 +598,8 @@
  3893.  echo $ac_n "checking for object suffix... $ac_c" 1>&6
  3894.  $rm conftest*
  3895.  echo 'int i = 1;' > conftest.c
  3896. -echo "$progname:586: checking for object suffix" >& 5
  3897. -if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  3898. +echo "$progname:601: checking for object suffix" >& 5
  3899. +if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  3900.    # Append any warnings to the config.log.
  3901.    cat conftest.err 1>&5
  3902.  
  3903. @@ -635,6 +650,11 @@
  3904.      # like `-m68040'.
  3905.      pic_flag='-m68020 -resident32 -malways-restore-a4'
  3906.      ;;
  3907. +  sysv4*MP*)
  3908. +    if test -d /usr/nec; then
  3909. +       pic_flag=-Kconform_pic
  3910. +    fi
  3911. +    ;;
  3912.    *)
  3913.      pic_flag='-fPIC'
  3914.      ;;
  3915. @@ -688,7 +708,7 @@
  3916.      wl='-Qoption ld '
  3917.      ;;
  3918.  
  3919. -  sysv4.2uw2* | sysv4.3* | sysv5*)
  3920. +  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  3921.      pic_flag='-KPIC'
  3922.      link_static_flag='-Bstatic'
  3923.      wl='-Wl,'
  3924. @@ -698,7 +718,12 @@
  3925.      pic_flag='-pic'
  3926.      link_static_flag='-Bstatic'
  3927.      ;;
  3928. -
  3929. +  sysv4*MP*)
  3930. +    if test -d /usr/nec ;then
  3931. +      pic_flag='-Kconform_pic'
  3932. +      link_static_flag='-Bstatic'
  3933. +    fi
  3934. +    ;;
  3935.    *)
  3936.      can_build_shared=no
  3937.      ;;
  3938. @@ -714,8 +739,8 @@
  3939.    echo "int some_variable = 0;" > conftest.c
  3940.    save_CFLAGS="$CFLAGS"
  3941.    CFLAGS="$CFLAGS $pic_flag -DPIC"
  3942. -  echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
  3943. -  if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  3944. +  echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5
  3945. +  if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  3946.      # Append any warnings to the config.log.
  3947.      cat conftest.err 1>&5
  3948.      
  3949. @@ -753,16 +778,26 @@
  3950.  
  3951.  # Check to see if options -o and -c are simultaneously supported by compiler
  3952.  echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
  3953. +$rm -r conftest 2>/dev/null
  3954. +mkdir conftest
  3955. +cd conftest
  3956.  $rm conftest*
  3957.  echo "int some_variable = 0;" > conftest.c
  3958. +mkdir out
  3959. +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  3960. +# that will create temporary files in the current directory regardless of
  3961. +# the output directory.  Thus, making CWD read-only will cause this test
  3962. +# to fail, enabling locking or at least warning the user not to do parallel
  3963. +# builds.
  3964. +chmod -w .
  3965.  save_CFLAGS="$CFLAGS"
  3966. -CFLAGS="$CFLAGS -c -o conftest2.o"
  3967. -echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
  3968. -if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
  3969. +CFLAGS="$CFLAGS -o out/conftest2.o"
  3970. +echo "$progname:795: checking if $compiler supports -c -o file.o" >&5
  3971. +if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  3972.  
  3973.    # The compiler can only warn and ignore the option if not recognized
  3974.    # So say no if there are warnings
  3975. -    if test -s conftest.err; then
  3976. +    if test -s out/conftest.err; then
  3977.        echo "$ac_t"no 1>&6
  3978.        compiler_c_o=no
  3979.      else
  3980. @@ -771,12 +806,17 @@
  3981.      fi
  3982.  else
  3983.    # Append any errors to the config.log.
  3984. -  cat conftest.err 1>&5
  3985. +  cat out/conftest.err 1>&5
  3986.    compiler_c_o=no
  3987.    echo "$ac_t"no 1>&6
  3988.  fi
  3989.  CFLAGS="$save_CFLAGS"
  3990. -$rm conftest*
  3991. +chmod u+w .
  3992. +$rm conftest* out/*
  3993. +rmdir out
  3994. +cd ..
  3995. +rmdir conftest
  3996. +$rm -r conftest 2>/dev/null
  3997.  
  3998.  if test x"$compiler_c_o" = x"yes"; then
  3999.    # Check to see if we can write to a .lo
  4000. @@ -785,8 +825,8 @@
  4001.    echo "int some_variable = 0;" > conftest.c
  4002.    save_CFLAGS="$CFLAGS"
  4003.    CFLAGS="$CFLAGS -c -o conftest.lo"
  4004. -  echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
  4005. -if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  4006. +  echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5
  4007. +if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  4008.  
  4009.      # The compiler can only warn and ignore the option if not recognized
  4010.      # So say no if there are warnings
  4011. @@ -837,8 +877,8 @@
  4012.    echo "int some_variable = 0;" > conftest.c
  4013.    save_CFLAGS="$CFLAGS"
  4014.    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
  4015. -  echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  4016. -  if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  4017. +  echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  4018. +  if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  4019.  
  4020.      # The compiler can only warn and ignore the option if not recognized
  4021.      # So say no if there are warnings
  4022. @@ -881,8 +921,8 @@
  4023.  echo 'main(){return(0);}' > conftest.c
  4024.  save_LDFLAGS="$LDFLAGS"
  4025.  LDFLAGS="$LDFLAGS $link_static_flag"
  4026. -echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
  4027. -if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4028. +echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5
  4029. +if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4030.    echo "$ac_t$link_static_flag" 1>&6
  4031.  else
  4032.    echo "$ac_t"none 1>&6
  4033. @@ -894,9 +934,9 @@
  4034.  if test -z "$LN_S"; then
  4035.    # Check to see if we can use ln -s, or we need hard links.
  4036.    echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
  4037. -  $rm conftestdata
  4038. -  if ln -s X conftestdata 2>/dev/null; then
  4039. -    $rm conftestdata
  4040. +  $rm conftest.dat
  4041. +  if ln -s X conftest.dat 2>/dev/null; then
  4042. +    $rm conftest.dat
  4043.      LN_S="ln -s"
  4044.    else
  4045.      LN_S=ln
  4046. @@ -914,11 +954,11 @@
  4047.    if test "$with_gcc" = yes; then
  4048.      # Check if gcc -print-prog-name=ld gives a path.
  4049.      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
  4050. -    echo "$progname:917: checking for ld used by GCC" >&5
  4051. +    echo "$progname:957: checking for ld used by GCC" >&5
  4052.      ac_prog=`($CC -print-prog-name=ld) 2>&5`
  4053.      case "$ac_prog" in
  4054.      # Accept absolute paths.
  4055. -    /* | [A-Za-z]:[\\/]*)
  4056. +    [\\/]* | [A-Za-z]:[\\/]*)
  4057.        re_direlt='/[^/][^/]*/\.\./'
  4058.        # Canonicalize the path of ld
  4059.        ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  4060. @@ -938,10 +978,10 @@
  4061.      esac
  4062.    elif test "$with_gnu_ld" = yes; then
  4063.      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
  4064. -    echo "$progname:941: checking for GNU ld" >&5
  4065. +    echo "$progname:981: checking for GNU ld" >&5
  4066.    else
  4067.      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  4068. -    echo "$progname:944: checking for non-GNU ld" >&5
  4069. +    echo "$progname:984: checking for non-GNU ld" >&5
  4070.    fi
  4071.  
  4072.    if test -z "$LD"; then
  4073. @@ -948,7 +988,7 @@
  4074.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  4075.      for ac_dir in $PATH; do
  4076.        test -z "$ac_dir" && ac_dir=.
  4077. -      if test -f "$ac_dir/$ac_prog"; then
  4078. +      if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  4079.      LD="$ac_dir/$ac_prog"
  4080.      # Check to see if the program is GNU ld.  I'd rather use --version,
  4081.      # but apparently some GNU ld's only accept -v.
  4082. @@ -1015,7 +1055,12 @@
  4083.  # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4084.  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4085.  # as well as any symbol that contains `d'.
  4086. -exclude_expsyms=
  4087. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  4088. +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4089. +# platforms (ab)use it in PIC code, but their linkers get confused if
  4090. +# the symbol is explicitly referenced.  Since portable code cannot
  4091. +# rely on this symbol name, it's probably fine to never include it in
  4092. +# preloaded symbol tables.
  4093.  
  4094.  case "$host_os" in
  4095.  cygwin* | mingw*)
  4096. @@ -1027,10 +1072,6 @@
  4097.    fi
  4098.    ;;
  4099.  
  4100. -freebsd2* | sunos4*)
  4101. -  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  4102. -  ;;
  4103. -
  4104.  esac
  4105.  
  4106.  ld_shlibs=yes
  4107. @@ -1058,18 +1099,21 @@
  4108.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  4109.      hardcode_libdir_flag_spec='-L$libdir'
  4110.      hardcode_minus_L=yes
  4111. -    ;;
  4112.  
  4113. -  sunos4*)
  4114. -    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  4115. -    wlarc=
  4116. -    hardcode_direct=yes
  4117. -    hardcode_minus_L=yes
  4118. -    hardcode_shlibpath_var=no
  4119. +    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  4120. +    # that the semantics of dynamic libraries on AmigaOS, at least up
  4121. +    # to version 4, is to share data among multiple programs linked
  4122. +    # with the same dynamic library.  Since this doesn't match the
  4123. +    # behavior of shared libraries on other platforms, we can use
  4124. +    # them.
  4125. +    ld_shlibs=no
  4126.      ;;
  4127.  
  4128.    beos*)
  4129.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  4130. +      allow_undefined_flag=unsupported
  4131. +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4132. +      # support --undefined.  This deserves some investigation.  FIXME
  4133.        archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  4134.      else
  4135.        ld_shlibs=no
  4136. @@ -1087,7 +1131,7 @@
  4137.      # then regenerate the def file from the symbol export list, so that
  4138.      # the compiled dll only exports the symbol export list.
  4139.      export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
  4140. -      sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  4141. +      sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  4142.        (cd $objdir && $CC -c $soname-ltdll.c)~
  4143.        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs~
  4144.        sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  4145. @@ -1095,7 +1139,7 @@
  4146.      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  4147.        _lt_hint=1;
  4148.        for symbol in `cat $export_symbols`; do
  4149. -        echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  4150. +    echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  4151.      _lt_hint=`expr 1 + \$_lt_hint`;
  4152.        done~
  4153.        $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
  4154. @@ -1107,6 +1151,44 @@
  4155.        old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
  4156.      ;;
  4157.  
  4158. +  netbsd*)
  4159. +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  4160. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  4161. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4162. +    else
  4163. +      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
  4164. +      # can we support soname and/or expsyms with a.out? -oliva
  4165. +    fi
  4166. +    ;;
  4167. +
  4168. +  solaris*)
  4169. +    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  4170. +      ld_shlibs=no
  4171. +      cat <<EOF 1>&2
  4172. +
  4173. +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4174. +*** create shared libraries on Solaris systems.  Therefore, libtool
  4175. +*** is disabling shared libraries support.  We urge you to upgrade GNU
  4176. +*** binutils to release 2.9.1 or newer.  Another option is to modify
  4177. +*** your PATH or compiler configuration so that the native linker is
  4178. +*** used, and then restart.
  4179. +
  4180. +EOF
  4181. +    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  4182. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  4183. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4184. +    else
  4185. +      ld_shlibs=no
  4186. +    fi
  4187. +    ;;      
  4188. +
  4189. +  sunos4*)
  4190. +    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
  4191. +    wlarc=
  4192. +    hardcode_direct=yes
  4193. +    hardcode_shlibpath_var=no
  4194. +    ;;
  4195. +
  4196.    *)
  4197.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  4198.        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  4199. @@ -1121,7 +1203,15 @@
  4200.      runpath_var=LD_RUN_PATH
  4201.      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  4202.      export_dynamic_flag_spec='${wl}--export-dynamic'
  4203. -    whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4204. +    case $host_os in
  4205. +    cygwin* | mingw*)
  4206. +      # dlltool doesn't understand --whole-archive et. al.
  4207. +      whole_archive_flag_spec=
  4208. +      ;;
  4209. +    *)
  4210. +      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4211. +      ;;
  4212. +    esac
  4213.    fi
  4214.  else
  4215.    # PORTME fill in a description of your system's linker (not GNU ld)
  4216. @@ -1141,10 +1231,12 @@
  4217.      ;;
  4218.  
  4219.    aix4*)
  4220. -    allow_undefined_flag=
  4221. +    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  4222. +    hardcode_libdir_separator=':'
  4223.      if test "$with_gcc" = yes; then
  4224. -      if strings `${CC} -print-prog-name=collect2` | \
  4225. -     grep resolve_lib_name >/dev/null
  4226. +      collect2name=`${CC} -print-prog-name=collect2`
  4227. +      if test -f "$collect2name" && \
  4228. +     strings "$collect2name" | grep resolve_lib_name >/dev/null
  4229.        then
  4230.      # We have reworked collect2
  4231.      hardcode_direct=yes
  4232. @@ -1151,19 +1243,25 @@
  4233.        else
  4234.      # We have old collect2
  4235.      hardcode_direct=unsupported
  4236. +    # It fails to find uninstalled libraries when the uninstalled
  4237. +    # path is not listed in the libpath.  Setting hardcode_minus_L
  4238. +    # to unsupported forces relinking
  4239. +    hardcode_minus_L=yes
  4240. +    hardcode_libdir_flag_spec='-L$libdir'
  4241. +    hardcode_libdir_separator=
  4242.        fi
  4243. -      archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
  4244. +      shared_flag='-shared'
  4245.      else
  4246. -      always_export_symbols=yes
  4247. -      archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
  4248. +      shared_flag='${wl}-bM:SRE'
  4249.        hardcode_direct=yes
  4250.      fi
  4251. -    hardcode_minus_L=yes
  4252. -    # Though LIBPATH variable hardcodes shlibpath into executable,
  4253. -    # it doesn't affect searching for -l* libraries; this confuses
  4254. -    # tests in mdemo.
  4255. -    hardcode_shlibpath_var=unsupported
  4256. -    hardcode_libdir_flag_spec='-L$libdir'
  4257. +    allow_undefined_flag=' ${wl}-berok'
  4258. +    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  4259. +    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  4260. +    case "$host_os" in aix4.[01]|aix4.[01].*)
  4261. +      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  4262. +      always_export_symbols=yes ;;
  4263. +    esac
  4264.     ;;
  4265.  
  4266.    amigaos*)
  4267. @@ -1170,6 +1268,8 @@
  4268.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  4269.      hardcode_libdir_flag_spec='-L$libdir'
  4270.      hardcode_minus_L=yes
  4271. +    # see comment about different semantics on the GNU ld section
  4272. +    ld_shlibs=no
  4273.      ;;
  4274.  
  4275.    cygwin* | mingw*)
  4276. @@ -1192,7 +1292,6 @@
  4277.  
  4278.    freebsd1*)
  4279.      ld_shlibs=no
  4280. -    can_build_shared=no
  4281.      ;;
  4282.  
  4283.    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4284. @@ -1203,7 +1302,6 @@
  4285.      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  4286.      hardcode_libdir_flag_spec='-R$libdir'
  4287.      hardcode_direct=yes
  4288. -    hardcode_minus_L=no # verified on 2.2.6
  4289.      hardcode_shlibpath_var=no
  4290.      ;;
  4291.  
  4292. @@ -1220,31 +1318,27 @@
  4293.      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  4294.      hardcode_libdir_flag_spec='-R$libdir'
  4295.      hardcode_direct=yes
  4296. -    hardcode_minus_L=no
  4297.      hardcode_shlibpath_var=no
  4298.      ;;
  4299.  
  4300. -  hpux9*)
  4301. -    archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
  4302. -    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  4303. -    hardcode_direct=yes
  4304. -    hardcode_minus_L=yes
  4305. -    export_dynamic_flag_spec='${wl}-E'
  4306. -    ;;
  4307. -
  4308. -  hpux10* | hpux11*)
  4309. -    archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
  4310. +  hpux9* | hpux10* | hpux11*)
  4311. +    case "$host_os" in
  4312. +    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
  4313. +    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  4314. +    esac
  4315.      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  4316. +    hardcode_libdir_separator=:
  4317.      hardcode_direct=yes
  4318. -    hardcode_minus_L=yes
  4319. +    hardcode_minus_L=yes # Not in the search PATH, but as the default
  4320. +             # location of the library.
  4321.      export_dynamic_flag_spec='${wl}-E'
  4322.      ;;
  4323.  
  4324.    irix5* | irix6*)
  4325.      if test "$with_gcc" = yes; then
  4326. -      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  4327. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  4328.      else
  4329. -      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  4330. +      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  4331.      fi
  4332.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  4333.      hardcode_libdir_separator=:
  4334. @@ -1279,10 +1373,10 @@
  4335.    osf3* | osf4*)
  4336.      if test "$with_gcc" = yes; then
  4337.        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  4338. -      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  4339. +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  4340.      else
  4341.        allow_undefined_flag=' -expect_unresolved \*'
  4342. -      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  4343. +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  4344.      fi
  4345.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  4346.      hardcode_libdir_separator=:
  4347. @@ -1289,8 +1383,10 @@
  4348.      ;;
  4349.  
  4350.    sco3.2v5*)
  4351. -    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  4352. -    hardcode_direct=yes
  4353. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  4354. +    hardcode_shlibpath_var=no
  4355. +    runpath_var=LD_RUN_PATH
  4356. +    hardcode_runpath_var=yes
  4357.      ;;
  4358.  
  4359.    solaris*)
  4360. @@ -1302,16 +1398,15 @@
  4361.          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  4362.      hardcode_libdir_flag_spec='-R$libdir'
  4363.      hardcode_shlibpath_var=no
  4364. +    case "$host_os" in
  4365. +    solaris2.[0-5] | solaris2.[0-5].*) ;;
  4366. +    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  4367. +      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  4368. +    esac
  4369.      ;;
  4370.  
  4371.    sunos4*)
  4372. -    # Why do we need -Bstatic?  To avoid inter-library dependencies, maybe...
  4373. -    if test "$with_gcc" = yes; then
  4374. -      # Use -fPIC here because libgcc is multilibbed
  4375. -      archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
  4376. -    else
  4377. -      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  4378. -    fi
  4379. +    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  4380.      hardcode_libdir_flag_spec='-L$libdir'
  4381.      hardcode_direct=yes
  4382.      hardcode_minus_L=yes
  4383. @@ -1318,10 +1413,15 @@
  4384.      hardcode_shlibpath_var=no
  4385.      ;;
  4386.  
  4387. +  sysv4)
  4388. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  4389. +    runpath_var='LD_RUN_PATH'
  4390. +    hardcode_shlibpath_var=no
  4391. +    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
  4392. +    ;;  
  4393. +
  4394.    sysv4.3*)
  4395.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  4396. -    hardcode_direct=no
  4397. -    hardcode_minus_L=no
  4398.      hardcode_shlibpath_var=no
  4399.      export_dynamic_flag_spec='-Bexport'
  4400.      ;;
  4401. @@ -1329,8 +1429,6 @@
  4402.    uts4*)
  4403.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  4404.      hardcode_libdir_flag_spec='-L$libdir'
  4405. -    hardcode_direct=no
  4406. -    hardcode_minus_L=no
  4407.      hardcode_shlibpath_var=no
  4408.      ;;
  4409.  
  4410. @@ -1337,28 +1435,37 @@
  4411.    dgux*)
  4412.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  4413.      hardcode_libdir_flag_spec='-L$libdir'
  4414. -    hardcode_direct=no
  4415. -    hardcode_minus_L=no
  4416. +    hardcode_shlibpath_var=no
  4417. +    ;;
  4418. +
  4419. +  sysv4*MP*)
  4420. +    if test -d /usr/nec ;then
  4421. +    # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
  4422. +    archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
  4423.      hardcode_shlibpath_var=no
  4424. +    runpath_var=LD_RUN_PATH
  4425. +    hardcode_runpath_var=yes
  4426. +    ld_shlibs=yes
  4427. +    fi
  4428.      ;;
  4429.  
  4430.    *)
  4431.      ld_shlibs=no
  4432. -    can_build_shared=no
  4433.      ;;
  4434.    esac
  4435.  fi
  4436.  echo "$ac_t$ld_shlibs" 1>&6
  4437. +test "$ld_shlibs" = no && can_build_shared=no
  4438.  
  4439.  if test -z "$NM"; then
  4440.    echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  4441.    case "$NM" in
  4442. -  /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
  4443. +  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  4444.    *)
  4445.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  4446.      for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  4447.        test -z "$ac_dir" && ac_dir=.
  4448. -      if test -f $ac_dir/nm; then
  4449. +      if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  4450.      # Check to see if the nm accepts a BSD-compat flag.
  4451.      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  4452.      #   nm: unknown option "B" ignored
  4453. @@ -1416,6 +1523,9 @@
  4454.  solaris*)
  4455.    symcode='[BDT]'
  4456.    ;;
  4457. +sysv4)
  4458. +  symcode='[DFNSTU]'
  4459. +  ;;
  4460.  esac
  4461.  
  4462.  # If we're using GNU nm, then use its standard symbol codes.
  4463. @@ -1444,11 +1554,11 @@
  4464.  main(){nm_test_var='a';nm_test_func();return(0);}
  4465.  EOF
  4466.  
  4467. -  echo "$progname:1447: checking if global_symbol_pipe works" >&5
  4468. -  if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  4469. +  echo "$progname:1557: checking if global_symbol_pipe works" >&5
  4470. +  if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  4471.      # Now try to grab the symbols.
  4472.      nlist=conftest.nm
  4473. -    if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  4474. +    if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  4475.  
  4476.        # Try sorting and uniquifying the output.
  4477.        if sort "$nlist" | uniq > "$nlist"T; then
  4478. @@ -1495,12 +1605,12 @@
  4479.  #endif
  4480.  EOF
  4481.        # Now try linking the two files.
  4482. -      mv conftest.$objext conftestm.$objext
  4483. +      mv conftest.$objext conftstm.$objext
  4484.        save_LIBS="$LIBS"
  4485.        save_CFLAGS="$CFLAGS"
  4486. -      LIBS="conftestm.$objext"
  4487. +      LIBS="conftstm.$objext"
  4488.        CFLAGS="$CFLAGS$no_builtin_flag"
  4489. -      if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4490. +      if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  4491.          pipe_works=yes
  4492.        else
  4493.          echo "$progname: failed program was:" >&5
  4494. @@ -1520,7 +1630,7 @@
  4495.      echo "$progname: failed program was:" >&5
  4496.      cat conftest.c >&5
  4497.    fi
  4498. -  $rm conftest*
  4499. +  $rm conftest* conftst*
  4500.  
  4501.    # Do not use the global_symbol_pipe unless it works.
  4502.    if test "$pipe_works" = yes; then
  4503. @@ -1529,7 +1639,11 @@
  4504.      global_symbol_pipe=
  4505.    fi
  4506.  done
  4507. -echo "$ac_t$pipe_works" 1>&6
  4508. +if test "$pipe_works" = yes; then
  4509. +  echo "${ac_t}ok" 1>&6
  4510. +else
  4511. +  echo "${ac_t}failed" 1>&6
  4512. +fi
  4513.  
  4514.  if test -z "$global_symbol_pipe"; then
  4515.    global_symbol_to_cdecl=
  4516. @@ -1542,10 +1656,12 @@
  4517.     test -n "$runpath_var"; then
  4518.  
  4519.    # We can hardcode non-existant directories.
  4520. -  if test "$hardcode_direct" != no && \
  4521. -     test "$hardcode_minus_L" != no && \
  4522. -     test "$hardcode_shlibpath_var" != no; then
  4523. -
  4524. +  if test "$hardcode_direct" != no &&
  4525. +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
  4526. +     # have to relink, otherwise we might link with an installed library
  4527. +     # when we should be linking with a yet-to-be-installed one
  4528. +     ## test "$hardcode_shlibpath_var" != no &&
  4529. +     test "$hardcode_minus_L" != no; then
  4530.      # Linking always hardcodes the temporary library directory.
  4531.      hardcode_action=relink
  4532.    else
  4533. @@ -1628,6 +1744,10 @@
  4534.    library_names_spec='${libname}.so'
  4535.    dynamic_linker="$host_os ld.so"
  4536.    shlibpath_var=LIBRARY_PATH
  4537. +  deplibs_check_method=pass_all
  4538. +  lt_cv_dlopen="load_add_on"
  4539. +  lt_cv_dlopen_libs=
  4540. +  lt_cv_dlopen_self=yes
  4541.    ;;
  4542.  
  4543.  bsdi4*)
  4544. @@ -1634,7 +1754,7 @@
  4545.    version_type=linux
  4546.    library_names_spec='${libname}.so$major ${libname}.so'
  4547.    soname_spec='${libname}.so'
  4548. -  finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
  4549. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  4550.    shlibpath_var=LD_LIBRARY_PATH
  4551.    deplibs_check_method='file_magic ELF 32-bit LSB shared object'
  4552.    file_magic_cmd=/usr/bin/file
  4553. @@ -1654,11 +1774,13 @@
  4554.      library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  4555.    fi
  4556.    dynamic_linker='Win32 ld.exe'
  4557. -  deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
  4558. -  file_magic_cmd='objdump -f'
  4559. +  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  4560. +  file_magic_cmd='${OBJDUMP} -f'
  4561.    need_lib_prefix=no
  4562.    # FIXME: first we should search . and the directory the executable is in
  4563.    shlibpath_var=PATH
  4564. +  lt_cv_dlopen="LoadLibrary"
  4565. +  lt_cv_dlopen_libs=
  4566.    ;;
  4567.  
  4568.  freebsd1*)
  4569. @@ -1683,7 +1805,7 @@
  4570.        need_version=yes
  4571.        ;;
  4572.    esac
  4573. -  finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  4574. +  finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  4575.    shlibpath_var=LD_LIBRARY_PATH
  4576.    ;;
  4577.  
  4578. @@ -1701,6 +1823,7 @@
  4579.    need_lib_prefix=no
  4580.    need_version=no
  4581.    shlibpath_var=SHLIB_PATH
  4582. +  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  4583.    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  4584.    soname_spec='${libname}${release}.sl$major'
  4585.    # HP-UX runs *really* slowly unless shared libraries are mode 555.
  4586. @@ -1707,40 +1830,36 @@
  4587.    postinstall_cmds='chmod 555 $lib'
  4588.    ;;
  4589.  
  4590. -irix5*)
  4591. -  version_type=irix
  4592. -  soname_spec='${libname}${release}.so'
  4593. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  4594. -  shlibpath_var=LD_LIBRARY_PATH
  4595. -  deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
  4596. -  file_magic_cmd=/usr/bin/file
  4597. -  file_magic_test_file=`echo /lib/libc.so*`
  4598. -  shlibpath_overrides_runpath=no
  4599. -  ;;
  4600. -
  4601. -irix6*)
  4602. +irix5* | irix6*)
  4603.    version_type=irix
  4604.    need_lib_prefix=no
  4605.    need_version=no
  4606. -  soname_spec='${libname}${release}.so'
  4607. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  4608. -  case "$LD" in # libtool.m4 will add one of these switches to LD
  4609. -  *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  4610. -  *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  4611. -  *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  4612. -  *) libsuff= shlibsuff= libmagic=never-match;;
  4613. +  soname_spec='${libname}${release}.so.$major'
  4614. +  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  4615. +  case "$host_os" in
  4616. +  irix5*)
  4617. +    libsuff= shlibsuff=
  4618. +    # this will be overridden with pass_all, but let us keep it just in case
  4619. +    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  4620. +    ;;
  4621. +  *)
  4622. +    case "$LD" in # libtool.m4 will add one of these switches to LD
  4623. +    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  4624. +    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  4625. +    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  4626. +    *) libsuff= shlibsuff= libmagic=never-match;;
  4627. +    esac
  4628. +    # this will be overridden with pass_all, but let us keep it just in case
  4629. +    deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
  4630. +    ;;
  4631.    esac
  4632.    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  4633.    shlibpath_overrides_runpath=no
  4634. -  # even though /usr/local/lib is always searched, the man-page says
  4635. -  # shared libraries should not be installed there if they use an ABI
  4636. -  # different from -32, so we'd better not search for shared libraries
  4637. -  # there either
  4638. -  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  4639. -  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  4640. -  deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
  4641. +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  4642. +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  4643.    file_magic_cmd=/usr/bin/file
  4644.    file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  4645. +  deplibs_check_method='pass_all'
  4646.    ;;
  4647.  
  4648.  # No shared lib support for Linux oldld, aout, or coff.
  4649. @@ -1755,7 +1874,7 @@
  4650.    need_version=no
  4651.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  4652.    soname_spec='${libname}${release}.so$major'
  4653. -  finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
  4654. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  4655.    shlibpath_var=LD_LIBRARY_PATH
  4656.    shlibpath_overrides_runpath=no
  4657.    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  4658. @@ -1777,7 +1896,7 @@
  4659.    version_type=sunos
  4660.    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4661.      library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  4662. -    finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
  4663. +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  4664.      dynamic_linker='NetBSD (a.out) ld.so'
  4665.    else
  4666.      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  4667. @@ -1808,17 +1927,15 @@
  4668.  
  4669.  osf3* | osf4*)
  4670.    version_type=osf
  4671. +  need_version=no
  4672.    soname_spec='${libname}${release}.so'
  4673.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  4674.    shlibpath_var=LD_LIBRARY_PATH
  4675. -  # deplibs_check_method='pass_all'
  4676. -  # Although pass_all appears to work, it copies symbols from static libraries
  4677. -  # into shared ones and exports them.  So, when a program is linked with two
  4678. -  # or more libraries that have got copies of the same symbols, link fails
  4679. -  # This was only tested on osf4:
  4680. +  # this will be overridden with pass_all, but let us keep it just in case
  4681.    deplibs_check_method='file_magic COFF format alpha shared library'
  4682.    file_magic_cmd=/usr/bin/file
  4683.    file_magic_test_file=/shlib/libc.so
  4684. +  deplibs_check_method='pass_all'
  4685.    sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  4686.    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  4687.    ;;
  4688. @@ -1857,7 +1974,7 @@
  4689.    need_version=yes
  4690.    ;;
  4691.  
  4692. -sysv4.2uw2* | sysv4.3* | sysv5*)
  4693. +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4694.    version_type=linux
  4695.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  4696.    soname_spec='${libname}${release}.so$major'
  4697. @@ -1866,6 +1983,15 @@
  4698.      ncr)
  4699.        deplibs_check_method='pass_all'
  4700.        ;;
  4701. +    motorola)
  4702. +      need_lib_prefix=no
  4703. +      need_version=no
  4704. +      shlibpath_overrides_runpath=no
  4705. +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  4706. +      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
  4707. +      file_magic_cmd=/usr/bin/file
  4708. +      file_magic_test_file=`echo /usr/lib/libc.so*`
  4709. +      ;;
  4710.    esac
  4711.    ;;
  4712.  
  4713. @@ -1885,6 +2011,15 @@
  4714.    shlibpath_var=LD_LIBRARY_PATH
  4715.    ;;
  4716.  
  4717. +sysv4*MP*)
  4718. +  if test -d /usr/nec ;then
  4719. +    version_type=linux
  4720. +    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  4721. +    soname_spec='$libname.so.$major'
  4722. +    shlibpath_var=LD_LIBRARY_PATH
  4723. +  fi
  4724. +  ;;
  4725. +
  4726.  *)
  4727.    dynamic_linker=no
  4728.    ;;
  4729. @@ -1895,6 +2030,17 @@
  4730.  # Report the final consequences.
  4731.  echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  4732.  
  4733. +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  4734. +# configure.in, otherwise build static only libraries.
  4735. +case "$host_os" in
  4736. +cygwin* | mingw* | os2*)
  4737. +  if test x$can_build_shared = xyes; then
  4738. +    test x$enable_win32_dll = xno && can_build_shared=no
  4739. +    echo "checking if package supports dlls... $can_build_shared" 1>&6
  4740. +  fi
  4741. +;;
  4742. +esac
  4743. +
  4744.  if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
  4745.    case "$deplibs_check_method" in
  4746.    "file_magic "*)
  4747. @@ -1973,16 +2119,16 @@
  4748.  else
  4749.  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  4750.    lt_cv_dlopen=no lt_cv_dlopen_libs=
  4751. -echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  4752. -echo "$progname:1977: checking for dlopen" >&5
  4753. -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  4754. +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  4755. +echo "$progname:2123: checking for dlopen in -ldl" >&5
  4756. +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  4757. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4758.    echo $ac_n "(cached) $ac_c" 1>&6
  4759.  else
  4760. -  cat > conftest.$ac_ext <<EOF
  4761. -#line 1982 "ltconfig"
  4762. -/* System header to define __stub macros and hopefully few prototypes,
  4763. -    which can conflict with char dlopen(); below.  */
  4764. -#include <assert.h>
  4765. +  ac_save_LIBS="$LIBS"
  4766. +LIBS="-ldl  $LIBS"
  4767. +cat > conftest.$ac_ext <<EOF
  4768. +#line 2131 "ltconfig"
  4769.  /* Override any gcc2 internal prototype to avoid an error.  */
  4770.  /* We use char because int might match the return type of a gcc2
  4771.      builtin and then its argument prototype would still apply.  */
  4772. @@ -1989,45 +2135,37 @@
  4773.  char dlopen();
  4774.  
  4775.  int main() {
  4776. -
  4777. -/* The GNU C library defines this for functions which it implements
  4778. -    to always fail with ENOSYS.  Some functions are actually named
  4779. -    something starting with __ and the normal name is an alias.  */
  4780. -#if defined (__stub_dlopen) || defined (__stub___dlopen)
  4781. -choke me
  4782. -#else
  4783. -dlopen();
  4784. -#endif
  4785. -
  4786. +dlopen()
  4787.  ; return 0; }
  4788.  EOF
  4789. -if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4790. +if { (eval echo $progname:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4791.    rm -rf conftest*
  4792. -  eval "ac_cv_func_dlopen=yes"
  4793. +  eval "ac_cv_lib_$ac_lib_var=yes"
  4794.  else
  4795.    echo "$progname: failed program was:" >&5
  4796.    cat conftest.$ac_ext >&5
  4797.    rm -rf conftest*
  4798. -  eval "ac_cv_func_dlopen=no"
  4799. +  eval "ac_cv_lib_$ac_lib_var=no"
  4800.  fi
  4801.  rm -f conftest*
  4802. -fi
  4803. +LIBS="$ac_save_LIBS"
  4804.  
  4805. -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  4806. +fi
  4807. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4808.    echo "$ac_t""yes" 1>&6
  4809. -  lt_cv_dlopen="dlopen"
  4810. +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  4811.  else
  4812.    echo "$ac_t""no" 1>&6
  4813. -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  4814. -echo "$progname:2022: checking for dlopen in -ldl" >&5
  4815. -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  4816. -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4817. +echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  4818. +echo "$progname:2160: checking for dlopen" >&5
  4819. +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  4820.    echo $ac_n "(cached) $ac_c" 1>&6
  4821.  else
  4822. -  ac_save_LIBS="$LIBS"
  4823. -LIBS="-ldl  $LIBS"
  4824. -cat > conftest.$ac_ext <<EOF
  4825. -#line 2030 "ltconfig"
  4826. +  cat > conftest.$ac_ext <<EOF
  4827. +#line 2165 "ltconfig"
  4828. +/* System header to define __stub macros and hopefully few prototypes,
  4829. +    which can conflict with char dlopen(); below.  */
  4830. +#include <assert.h>
  4831.  /* Override any gcc2 internal prototype to avoid an error.  */
  4832.  /* We use char because int might match the return type of a gcc2
  4833.      builtin and then its argument prototype would still apply.  */
  4834. @@ -2034,29 +2172,36 @@
  4835.  char dlopen();
  4836.  
  4837.  int main() {
  4838. -dlopen()
  4839. +
  4840. +/* The GNU C library defines this for functions which it implements
  4841. +    to always fail with ENOSYS.  Some functions are actually named
  4842. +    something starting with __ and the normal name is an alias.  */
  4843. +#if defined (__stub_dlopen) || defined (__stub___dlopen)
  4844. +choke me
  4845. +#else
  4846. +dlopen();
  4847. +#endif
  4848. +
  4849.  ; return 0; }
  4850.  EOF
  4851. -if { (eval echo $progname:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4852. +if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4853.    rm -rf conftest*
  4854. -  eval "ac_cv_lib_$ac_lib_var=yes"
  4855. +  eval "ac_cv_func_dlopen=yes"
  4856.  else
  4857.    echo "$progname: failed program was:" >&5
  4858.    cat conftest.$ac_ext >&5
  4859.    rm -rf conftest*
  4860. -  eval "ac_cv_lib_$ac_lib_var=no"
  4861. +  eval "ac_cv_func_dlopen=no"
  4862.  fi
  4863.  rm -f conftest*
  4864. -LIBS="$ac_save_LIBS"
  4865. -
  4866.  fi
  4867. -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4868. +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  4869.    echo "$ac_t""yes" 1>&6
  4870. -  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  4871. +  lt_cv_dlopen="dlopen"
  4872.  else
  4873.    echo "$ac_t""no" 1>&6
  4874.  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  4875. -echo "$progname:2059: checking for dld_link in -ldld" >&5
  4876. +echo "$progname:2204: checking for dld_link in -ldld" >&5
  4877.  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  4878.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4879.    echo $ac_n "(cached) $ac_c" 1>&6
  4880. @@ -2064,7 +2209,7 @@
  4881.    ac_save_LIBS="$LIBS"
  4882.  LIBS="-ldld  $LIBS"
  4883.  cat > conftest.$ac_ext <<EOF
  4884. -#line 2067 "ltconfig"
  4885. +#line 2212 "ltconfig"
  4886.  /* Override any gcc2 internal prototype to avoid an error.  */
  4887.  /* We use char because int might match the return type of a gcc2
  4888.      builtin and then its argument prototype would still apply.  */
  4889. @@ -2074,7 +2219,7 @@
  4890.  dld_link()
  4891.  ; return 0; }
  4892.  EOF
  4893. -if { (eval echo $progname:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4894. +if { (eval echo $progname:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4895.    rm -rf conftest*
  4896.    eval "ac_cv_lib_$ac_lib_var=yes"
  4897.  else
  4898. @@ -2093,12 +2238,12 @@
  4899.  else
  4900.    echo "$ac_t""no" 1>&6
  4901.  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  4902. -echo "$progname:2096: checking for shl_load" >&5
  4903. +echo "$progname:2241: checking for shl_load" >&5
  4904.  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  4905.    echo $ac_n "(cached) $ac_c" 1>&6
  4906.  else
  4907.    cat > conftest.$ac_ext <<EOF
  4908. -#line 2101 "ltconfig"
  4909. +#line 2246 "ltconfig"
  4910.  /* System header to define __stub macros and hopefully few prototypes,
  4911.      which can conflict with char shl_load(); below.  */
  4912.  #include <assert.h>
  4913. @@ -2120,7 +2265,7 @@
  4914.  
  4915.  ; return 0; }
  4916.  EOF
  4917. -if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4918. +if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4919.    rm -rf conftest*
  4920.    eval "ac_cv_func_shl_load=yes"
  4921.  else
  4922. @@ -2137,54 +2282,47 @@
  4923.    lt_cv_dlopen="shl_load"
  4924.  else
  4925.    echo "$ac_t""no" 1>&6
  4926. -echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
  4927. -echo "$progname:2141: checking for LoadLibrary" >&5
  4928. -if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
  4929. +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  4930. +echo "$progname:2286: checking for shl_load in -ldld" >&5
  4931. +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  4932. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4933.    echo $ac_n "(cached) $ac_c" 1>&6
  4934.  else
  4935. -  cat > conftest.$ac_ext <<EOF
  4936. -#line 2146 "ltconfig"
  4937. -/* System header to define __stub macros and hopefully few prototypes,
  4938. -    which can conflict with char LoadLibrary(); below.  */
  4939. -#include <assert.h>
  4940. +  ac_save_LIBS="$LIBS"
  4941. +LIBS="-ldld  $LIBS"
  4942. +cat > conftest.$ac_ext <<EOF
  4943. +#line 2294 "ltconfig"
  4944. +#include "confdefs.h"
  4945.  /* Override any gcc2 internal prototype to avoid an error.  */
  4946.  /* We use char because int might match the return type of a gcc2
  4947.      builtin and then its argument prototype would still apply.  */
  4948. -char LoadLibrary();
  4949. +char shl_load();
  4950.  
  4951.  int main() {
  4952. -
  4953. -/* The GNU C library defines this for functions which it implements
  4954. -    to always fail with ENOSYS.  Some functions are actually named
  4955. -    something starting with __ and the normal name is an alias.  */
  4956. -#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
  4957. -choke me
  4958. -#else
  4959. -LoadLibrary();
  4960. -#endif
  4961. -
  4962. +shl_load()
  4963.  ; return 0; }
  4964.  EOF
  4965. -if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4966. +if { (eval echo $progname:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4967.    rm -rf conftest*
  4968. -  eval "ac_cv_func_LoadLibrary=yes"
  4969. +  eval "ac_cv_lib_$ac_lib_var=yes"
  4970.  else
  4971.    echo "$progname: failed program was:" >&5
  4972.    cat conftest.$ac_ext >&5
  4973.    rm -rf conftest*
  4974. -  eval "ac_cv_func_LoadLibrary=no"
  4975. +  eval "ac_cv_lib_$ac_lib_var=no"
  4976.  fi
  4977.  rm -f conftest*
  4978. -fi
  4979. +LIBS="$ac_save_LIBS"
  4980.  
  4981. -if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
  4982. +fi
  4983. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4984.    echo "$ac_t""yes" 1>&6
  4985. -  lt_cv_dlopen="LoadLibrary"
  4986. +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  4987.  else
  4988.    echo "$ac_t""no" 1>&6
  4989.  fi
  4990.  
  4991. -      
  4992. +
  4993.  fi
  4994.  
  4995.      
  4996. @@ -2207,17 +2345,17 @@
  4997.  for ac_hdr in dlfcn.h; do
  4998.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  4999.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5000. -echo "$progname:2210: checking for $ac_hdr" >&5
  5001. +echo "$progname:2348: checking for $ac_hdr" >&5
  5002.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5003.    echo $ac_n "(cached) $ac_c" 1>&6
  5004.  else
  5005.    cat > conftest.$ac_ext <<EOF
  5006. -#line 2215 "ltconfig"
  5007. +#line 2353 "ltconfig"
  5008.  #include <$ac_hdr>
  5009.  int fnord = 0;
  5010.  EOF
  5011.  ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
  5012. -{ (eval echo $progname:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5013. +{ (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5014.  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5015.  if test -z "$ac_err"; then
  5016.    rm -rf conftest*
  5017. @@ -2245,7 +2383,7 @@
  5018.      LIBS="$lt_cv_dlopen_libs $LIBS"
  5019.  
  5020.    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  5021. -echo "$progname:2248: checking whether a program can dlopen itself" >&5
  5022. +echo "$progname:2386: checking whether a program can dlopen itself" >&5
  5023.  if test "${lt_cv_dlopen_self+set}" = set; then
  5024.    echo $ac_n "(cached) $ac_c" 1>&6
  5025.  else
  5026. @@ -2253,7 +2391,7 @@
  5027.      lt_cv_dlopen_self=cross
  5028.    else
  5029.      cat > conftest.c <<EOF
  5030. -#line 2256 "ltconfig"
  5031. +#line 2394 "ltconfig"
  5032.  
  5033.  #if HAVE_DLFCN_H
  5034.  #include <dlfcn.h>
  5035. @@ -2299,7 +2437,7 @@
  5036.             if(ptr1 || ptr2) exit(0); } exit(1); } 
  5037.  
  5038.  EOF
  5039. -if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5040. +if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5041.  then
  5042.    lt_cv_dlopen_self=yes
  5043.  else
  5044. @@ -2318,7 +2456,7 @@
  5045.    if test "$lt_cv_dlopen_self" = yes; then
  5046.      LDFLAGS="$LDFLAGS $link_static_flag"
  5047.    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  5048. -echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
  5049. +echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5
  5050.  if test "${lt_cv_dlopen_self_static+set}" = set; then
  5051.    echo $ac_n "(cached) $ac_c" 1>&6
  5052.  else
  5053. @@ -2326,7 +2464,7 @@
  5054.      lt_cv_dlopen_self_static=cross
  5055.    else
  5056.      cat > conftest.c <<EOF
  5057. -#line 2329 "ltconfig"
  5058. +#line 2467 "ltconfig"
  5059.  
  5060.  #if HAVE_DLFCN_H
  5061.  #include <dlfcn.h>
  5062. @@ -2372,7 +2510,7 @@
  5063.      if(ptr1 || ptr2) exit(0); } exit(1); } 
  5064.  
  5065.  EOF
  5066. -if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5067. +if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  5068.  then
  5069.    lt_cv_dlopen_self_static=yes
  5070.  else
  5071. @@ -2416,8 +2554,10 @@
  5072.  case "$ltmain" in
  5073.  *.sh)
  5074.    # Now quote all the things that may contain metacharacters.
  5075. -  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  5076. -    old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  5077. +  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
  5078. +    old_LD old_LDFLAGS old_LIBS \
  5079. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
  5080. +    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  5081.      reload_flag reload_cmds wl \
  5082.      pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  5083.      thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  5084. @@ -2497,8 +2637,9 @@
  5085.  
  5086.  *)
  5087.    # Double-quote the variables that need it (for aesthetics).
  5088. -  for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  5089. -    old_LN_S old_DLLTOOL old_AS; do
  5090. +  for var in old_CC old_CFLAGS old_CPPFLAGS \
  5091. +    old_LD old_LDFLAGS old_LIBS \
  5092. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
  5093.      eval "$var=\\\"\$var\\\""
  5094.    done
  5095.  
  5096. @@ -2518,8 +2659,9 @@
  5097.  # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  5098.  #
  5099.  # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  5100. -# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  5101. -# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
  5102. +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  5103. +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  5104. +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
  5105.  #   $0$ltconfig_args
  5106.  #
  5107.  # Compiler and other test output produced by $progname, useful for
  5108. @@ -2565,6 +2707,9 @@
  5109.  # Used on cygwin: DLL creation program.
  5110.  DLLTOOL="$DLLTOOL"
  5111.  
  5112. +# Used on cygwin: object dumper.
  5113. +OBJDUMP="$OBJDUMP"
  5114. +
  5115.  # Used on cygwin: assembler.
  5116.  AS="$AS"
  5117.  
  5118. @@ -2587,7 +2732,7 @@
  5119.  # Additional compiler flags for building library objects.
  5120.  pic_flag=$pic_flag
  5121.  
  5122. -# Does compiler simultaneously support -c and -o options
  5123. +# Does compiler simultaneously support -c and -o options?
  5124.  compiler_c_o=$compiler_c_o
  5125.  
  5126.  # Can we write directly to a .lo ?
  5127. @@ -2657,7 +2802,7 @@
  5128.  # Method to check whether dependent libraries are shared objects.
  5129.  deplibs_check_method=$deplibs_check_method
  5130.  
  5131. -# Command to use when deplibs_check_method == file_magic
  5132. +# Command to use when deplibs_check_method == file_magic.
  5133.  file_magic_cmd=$file_magic_cmd
  5134.  
  5135.  # Flag that allows shared libraries with undefined symbols to be built.
  5136. @@ -2718,16 +2863,16 @@
  5137.  # Fix the shell variable \$srcfile for the compiler.
  5138.  fix_srcfile_path="$fix_srcfile_path"
  5139.  
  5140. -# Set to yes if exported symbols are required
  5141. +# Set to yes if exported symbols are required.
  5142.  always_export_symbols=$always_export_symbols
  5143.  
  5144. -# The command to extract exported symbols
  5145. +# The commands to list exported symbols.
  5146.  export_symbols_cmds=$export_symbols_cmds
  5147.  
  5148. -# Symbols that should not be listed in the preloaded symbols
  5149. +# Symbols that should not be listed in the preloaded symbols.
  5150.  exclude_expsyms=$exclude_expsyms
  5151.  
  5152. -# Symbols that must always be exported
  5153. +# Symbols that must always be exported.
  5154.  include_expsyms=$include_expsyms
  5155.  
  5156.  EOF
  5157. --- ./ltmain.sh    Tue Jul  6 10:33:41 1999
  5158. +++ ../ORBit-0.4.91/./ltmain.sh    Tue Jul  6 18:28:46 1999
  5159. @@ -2,7 +2,7 @@
  5160.  # NOTE: Changing this file will not affect anything until you rerun ltconfig.
  5161.  #
  5162.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  5163. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5164. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5165.  #
  5166.  # This program is free software; you can redistribute it and/or modify
  5167.  # it under the terms of the GNU General Public License as published by
  5168. @@ -28,12 +28,8 @@
  5169.    # Discard the --no-reexec flag, and continue.
  5170.    shift
  5171.  elif test "X$1" = X--fallback-echo; then
  5172. -  # used as fallback echo
  5173. -  shift
  5174. -  cat <<EOF
  5175. -$*
  5176. -EOF
  5177. -  exit 0
  5178. +  # Avoid inline document here, it may be left over
  5179. +  :
  5180.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  5181.    # Yippee, $echo works!
  5182.    :
  5183. @@ -42,6 +38,15 @@
  5184.    exec $SHELL "$0" --no-reexec ${1+"$@"}
  5185.  fi
  5186.  
  5187. +if test "X$1" = X--fallback-echo; then
  5188. +  # used as fallback echo
  5189. +  shift
  5190. +  cat <<EOF
  5191. +$*
  5192. +EOF
  5193. +  exit 0
  5194. +fi
  5195. +
  5196.  # The name of this program.
  5197.  progname=`$echo "$0" | sed 's%^.*/%%'`
  5198.  modename="$progname"
  5199. @@ -49,8 +54,8 @@
  5200.  # Constants.
  5201.  PROGRAM=ltmain.sh
  5202.  PACKAGE=libtool
  5203. -VERSION=1.2f
  5204. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  5205. +VERSION=1.3.2
  5206. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  5207.  
  5208.  default_mode=
  5209.  help="Try \`$progname --help' for more information."
  5210. @@ -100,6 +105,7 @@
  5211.  show_help=
  5212.  execute_dlfiles=
  5213.  lo2o="s/\\.lo\$/.${objext}/"
  5214. +o2lo="s/\\.${objext}\$/.lo/"
  5215.  
  5216.  # Parse our command line options once, thoroughly.
  5217.  while test $# -gt 0
  5218. @@ -460,6 +466,7 @@
  5219.      command="$command -o $output_obj"
  5220.        fi
  5221.  
  5222. +      $run $rm "$output_obj"
  5223.        $show "$command"
  5224.        if $run eval "$command"; then :
  5225.        else
  5226. @@ -539,6 +546,7 @@
  5227.  
  5228.        # Suppress compiler output if we already did a PIC compilation.
  5229.        command="$command$suppress_output"
  5230. +      $run $rm "$output_obj"
  5231.        $show "$command"
  5232.        if $run eval "$command"; then :
  5233.        else
  5234. @@ -630,7 +638,13 @@
  5235.  # #undef WIN32_LEAN_AND_MEAN
  5236.  # #include <stdio.h>
  5237.  #
  5238. +# #ifdef __cplusplus
  5239. +# extern "C" {
  5240. +# #endif
  5241.  # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5242. +# #ifdef __cplusplus
  5243. +# }
  5244. +# #endif
  5245.  #
  5246.  # #include <cygwin/cygwin_dll.h>
  5247.  # DECLARE_CYGWIN_DLL( DllMain );
  5248. @@ -815,6 +829,7 @@
  5249.      ltlibs=
  5250.      module=no
  5251.      objs=
  5252. +    prefer_static_libs=no
  5253.      preload=no
  5254.      prev=
  5255.      prevarg=
  5256. @@ -831,11 +846,21 @@
  5257.      do
  5258.        case "$arg" in
  5259.        -all-static | -static)
  5260. -    if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  5261. +    if test "X$arg" = "X-all-static"; then
  5262. +      if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  5263.          $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  5264. +      fi
  5265. +      if test -n "$link_static_flag"; then
  5266. +        dlopen_self=$dlopen_self_static
  5267. +      fi
  5268. +    else
  5269. +      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  5270. +        dlopen_self=$dlopen_self_static
  5271. +      fi
  5272.      fi
  5273.      build_libtool_libs=no
  5274.      build_old_libs=yes
  5275. +    prefer_static_libs=yes
  5276.      break
  5277.      ;;
  5278.        esac
  5279. @@ -873,13 +898,19 @@
  5280.            dlself=yes
  5281.          elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  5282.            dlself=yes
  5283. +        else
  5284. +          dlself=needless
  5285. +          export_dynamic=yes
  5286.          fi
  5287.          prev=
  5288.          continue
  5289.          ;;
  5290.        *)
  5291. -        dlprefiles="$dlprefiles $arg"
  5292. -        test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
  5293. +        if test "$prev" = dlfiles; then
  5294. +          dlfiles="$dlfiles $arg"
  5295. +        else
  5296. +          dlprefiles="$dlprefiles $arg"
  5297. +        fi
  5298.          prev=
  5299.          ;;
  5300.        esac
  5301. @@ -903,13 +934,26 @@
  5302.        prev=
  5303.        continue
  5304.        ;;
  5305. -    rpath)
  5306. -      rpath="$rpath $arg"
  5307. -      prev=
  5308. -      continue
  5309. -      ;;
  5310. -    xrpath)
  5311. -      xrpath="$xrpath $arg"
  5312. +    rpath | xrpath)
  5313. +      # We need an absolute path.
  5314. +      case "$arg" in
  5315. +      [\\/]* | [A-Za-z]:[\\/]*) ;;
  5316. +      *)
  5317. +        $echo "$modename: only absolute run-paths are allowed" 1>&2
  5318. +        exit 1
  5319. +        ;;
  5320. +      esac
  5321. +      if test "$prev" = rpath; then
  5322. +        case "$rpath " in
  5323. +        *" $arg "*) ;;
  5324. +        *) rpath="$rpath $arg" ;;
  5325. +        esac
  5326. +      else
  5327. +        case "$xrpath " in
  5328. +        *" $arg "*) ;;
  5329. +        *) xrpath="$xrpath $arg" ;;
  5330. +        esac
  5331. +      fi
  5332.        prev=
  5333.        continue
  5334.        ;;
  5335. @@ -928,7 +972,6 @@
  5336.      if test -n "$link_static_flag"; then
  5337.        compile_command="$compile_command $link_static_flag"
  5338.        finalize_command="$finalize_command $link_static_flag"
  5339. -      dlopen_self=$dlopen_self_static
  5340.      fi
  5341.      continue
  5342.      ;;
  5343. @@ -955,22 +998,16 @@
  5344.      ;;
  5345.  
  5346.        -export-dynamic)
  5347. -    if test "$export_dynamic" != yes; then
  5348. -      export_dynamic=yes
  5349. -      if test -n "$export_dynamic_flag_spec"; then
  5350. -        eval arg=\"$export_dynamic_flag_spec\"
  5351. -      else
  5352. -        arg=
  5353. -      fi
  5354. -    fi
  5355. +    export_dynamic=yes
  5356. +    continue
  5357.      ;;
  5358.  
  5359.        -export-symbols | -export-symbols-regex)
  5360.      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  5361. -      $echo "$modename: cannot have more than one -exported-symbols"
  5362. +      $echo "$modename: not more than one -exported-symbols argument allowed"
  5363.        exit 1
  5364.      fi
  5365. -    if test "$arg" = "-export-symbols"; then
  5366. +    if test "X$arg" = "X-export-symbols"; then
  5367.        prev=expsyms
  5368.      else
  5369.        prev=expsyms_regex
  5370. @@ -979,14 +1016,18 @@
  5371.      ;;
  5372.  
  5373.        -L*)
  5374. -    dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
  5375. +    dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  5376. +    # We need an absolute path.
  5377.      case "$dir" in
  5378. -    /* | [A-Za-z]:[/\\]*)
  5379. -      # Add the corresponding hardcode_libdir_flag, if it is not identical.
  5380. -      ;;
  5381. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  5382.      *)
  5383. -      $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
  5384. -      exit 1
  5385. +      absdir=`cd "$dir" && pwd`
  5386. +      if test -z "$absdir"; then
  5387. +        $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  5388. +        $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  5389. +        absdir="$dir"
  5390. +      fi
  5391. +      dir="$absdir"
  5392.        ;;
  5393.      esac
  5394.      case " $deplibs " in
  5395. @@ -1010,20 +1051,29 @@
  5396.      ;;
  5397.  
  5398.        -l*)
  5399. +    if test "$arg" = "-lc"; then
  5400. +      case "$host" in
  5401. +      *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  5402. +        # These systems don't actually have c library (as such)
  5403. +        continue
  5404. +        ;;
  5405. +      esac
  5406. +    elif test "$arg" = "-lm"; then
  5407. +      case "$host" in
  5408. +      *-*-cygwin* | *-*-beos*)
  5409. +        # These systems don't actually have math library (as such)
  5410. +        continue
  5411. +        ;;
  5412. +      esac
  5413. +    fi
  5414.      deplibs="$deplibs $arg"
  5415.      ;;
  5416.  
  5417.        -module)
  5418. -    if test "$module" != yes; then
  5419. -      module=yes
  5420. -      if test -n "$export_dynamic_flag_spec"; then
  5421. -        eval arg=\"$export_dynamic_flag_spec\"
  5422. -      else
  5423. -        arg=
  5424. -      fi
  5425. -    fi
  5426. +    module=yes
  5427. +    continue
  5428.      ;;
  5429. -    
  5430. +
  5431.        -no-undefined)
  5432.      allow_undefined=no
  5433.      continue
  5434. @@ -1047,7 +1097,19 @@
  5435.      ;;
  5436.  
  5437.        -R*)
  5438. -    xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
  5439. +    dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  5440. +    # We need an absolute path.
  5441. +    case "$dir" in
  5442. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  5443. +    *)
  5444. +      $echo "$modename: only absolute run-paths are allowed" 1>&2
  5445. +      exit 1
  5446. +      ;;
  5447. +    esac
  5448. +    case "$xrpath " in
  5449. +    *" $dir "*) ;;
  5450. +    *) xrpath="$xrpath $dir" ;;
  5451. +    esac
  5452.      continue
  5453.      ;;
  5454.  
  5455. @@ -1056,7 +1118,6 @@
  5456.      if test -z "$pic_flag" && test -n "$link_static_flag"; then
  5457.        compile_command="$compile_command $link_static_flag"
  5458.        finalize_command="$finalize_command $link_static_flag"
  5459. -      dlopen_self=$dlopen_self_static
  5460.      fi
  5461.      continue
  5462.      ;;
  5463. @@ -1128,6 +1189,7 @@
  5464.      # it will not redefine variable installed.
  5465.      installed=yes
  5466.  
  5467. +    # Read the .la file
  5468.      # If there is no directory component, then add one.
  5469.      case "$arg" in
  5470.      */* | *\\*) . $arg ;;
  5471. @@ -1218,7 +1280,8 @@
  5472.        prev=
  5473.      fi
  5474.  
  5475. -    if test "$build_libtool_libs" = yes && test -n "$library_names"; then
  5476. +    if test -n "$library_names" &&
  5477. +       { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  5478.        link_against_libtool_libs="$link_against_libtool_libs $arg"
  5479.        if test -n "$shlibpath_var"; then
  5480.          # Make sure the rpath contains only unique directories.
  5481. @@ -1230,12 +1293,13 @@
  5482.  
  5483.        # We need an absolute path.
  5484.        case "$dir" in
  5485. -      /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
  5486. +      [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  5487.        *)
  5488.          absdir=`cd "$dir" && pwd`
  5489.          if test -z "$absdir"; then
  5490. -          $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
  5491. -          exit 1
  5492. +          $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  5493. +          $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  5494. +          absdir="$dir"
  5495.          fi
  5496.          ;;
  5497.        esac
  5498. @@ -1244,7 +1308,7 @@
  5499.        # Skip directories that are in the system default run-time
  5500.        # search path, unless they have been requested with -R.
  5501.        case " $sys_lib_dlsearch_path " in
  5502. -       *" $absdir "*) ;;
  5503. +      *" $absdir "*) ;;
  5504.        *)
  5505.          case "$compile_rpath " in
  5506.          *" $absdir "*) ;;
  5507. @@ -1251,10 +1315,10 @@
  5508.          *) compile_rpath="$compile_rpath $absdir" 
  5509.          esac
  5510.          ;;
  5511. -       esac
  5512. +      esac
  5513.  
  5514.        case " $sys_lib_dlsearch_path " in
  5515. -       *" $libdir "*) ;;
  5516. +      *" $libdir "*) ;;
  5517.        *)
  5518.          case "$finalize_rpath " in
  5519.          *" $libdir "*) ;;
  5520. @@ -1261,7 +1325,7 @@
  5521.          *) finalize_rpath="$finalize_rpath $libdir"
  5522.          esac
  5523.          ;;
  5524. -       esac
  5525. +      esac
  5526.  
  5527.        lib_linked=yes
  5528.        case "$hardcode_action" in
  5529. @@ -1419,6 +1483,12 @@
  5530.        exit 1
  5531.      fi
  5532.  
  5533. +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  5534. +      eval arg=\"$export_dynamic_flag_spec\"
  5535. +      compile_command="$compile_command $arg"
  5536. +      finalize_command="$finalize_command $arg"
  5537. +    fi
  5538. +
  5539.      oldlibs=
  5540.      # calculate the name of the file, without its directory
  5541.      outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  5542. @@ -1441,7 +1511,7 @@
  5543.      $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  5544.        fi
  5545.  
  5546. -      if test -n "$dlfiles$dlprefiles"; then
  5547. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  5548.      $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  5549.        fi
  5550.  
  5551. @@ -1461,7 +1531,7 @@
  5552.      $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  5553.        fi
  5554.  
  5555. -      if test -n "$export_symbols"; then
  5556. +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  5557.      $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  5558.        fi
  5559.  
  5560. @@ -1500,11 +1570,6 @@
  5561.      output_objdir="$output_objdir/$objdir"
  5562.        fi
  5563.  
  5564. -      # All the library-specific variables (install_libdir is set above).
  5565. -      library_names=
  5566. -      old_library=
  5567. -      dlname=
  5568. -
  5569.        if test -n "$objs"; then
  5570.      $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
  5571.      exit 1
  5572. @@ -1516,7 +1581,7 @@
  5573.       exit 1
  5574.        fi
  5575.  
  5576. -      if test -n "$dlfiles$dlprefiles"; then
  5577. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  5578.      $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
  5579.        fi
  5580.  
  5581. @@ -1699,7 +1764,7 @@
  5582.  
  5583.      dependency_libs="$deplibs"
  5584.      case "$host" in
  5585. -    *-*-cygwin* | *-*-mingw* | *-*-os2*)
  5586. +    *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  5587.        # these systems don't actually have a c library (as such)!
  5588.        ;;
  5589.      *)
  5590. @@ -1747,12 +1812,13 @@
  5591.      droppeddeps=no
  5592.      case "$deplibs_check_method" in
  5593.      pass_all)
  5594. +      # Don't check for shared/static.  Everything works.
  5595. +      # This might be a little naive.  We might want to check
  5596. +      # whether the library exists or not.  But this is on
  5597. +      # osf3 & osf4 and I'm not really sure... Just
  5598. +      # implementing what was already the behaviour.
  5599.        newdeplibs=$deplibs
  5600. -            ;; # Don't check for shared/static.  Everything works.
  5601. -               # This might be a little naive.  We might want to check
  5602. -               # whether the library exists or not.  But this is on
  5603. -               # osf3 & osf4 and I'm not really sure... Just
  5604. -               # implementing what was already the behaviour.
  5605. +      ;;
  5606.      test_compile)
  5607.        # This code stresses the "libraries are programs" paradigm to its
  5608.        # limits. Maybe even breaks it.  We compile a program, linking it
  5609. @@ -1800,20 +1866,20 @@
  5610.          # Did it work?
  5611.          if test $? -eq 0 ; then
  5612.            ldd_output=`ldd conftest`
  5613. -            libname=`eval \\$echo \"$libname_spec\"`
  5614. -            deplib_matches=`eval \\$echo \"$library_names_spec\"`
  5615. -            set dummy $deplib_matches
  5616. -            deplib_match=$2
  5617. -            if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  5618. -              newdeplibs="$newdeplibs $i"
  5619. -            else
  5620. -              droppeddeps=yes
  5621. -              echo
  5622. -              echo "*** Warning: This library needs some functionality provided by $i."
  5623. -              echo "*** I have the capability to make that library automatically link in when"
  5624. -              echo "*** you link to this library.  But I can only do this if you have a"
  5625. -              echo "*** shared version of the library, which you do not appear to have."
  5626. -            fi
  5627. +          libname=`eval \\$echo \"$libname_spec\"`
  5628. +          deplib_matches=`eval \\$echo \"$library_names_spec\"`
  5629. +          set dummy $deplib_matches
  5630. +          deplib_match=$2
  5631. +          if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  5632. +            newdeplibs="$newdeplibs $i"
  5633. +          else
  5634. +            droppeddeps=yes
  5635. +            echo
  5636. +            echo "*** Warning: This library needs some functionality provided by $i."
  5637. +            echo "*** I have the capability to make that library automatically link in when"
  5638. +            echo "*** you link to this library.  But I can only do this if you have a"
  5639. +            echo "*** shared version of the library, which you do not appear to have."
  5640. +          fi
  5641.          else
  5642.            droppeddeps=yes
  5643.            echo
  5644. @@ -1827,7 +1893,6 @@
  5645.            fi
  5646.          done
  5647.        fi
  5648. -      deplibs=$newdeplibs
  5649.        ;;
  5650.      file_magic*)
  5651.        set dummy $deplibs_check_method
  5652. @@ -1841,7 +1906,7 @@
  5653.              potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  5654.              for potent_lib in $potential_libs; do
  5655.                # Follow soft links.
  5656. -              if ls -lLd "$potlib" 2>/dev/null \
  5657. +              if ls -lLd "$potent_lib" 2>/dev/null \
  5658.               | grep " -> " >/dev/null; then
  5659.              continue 
  5660.                fi
  5661. @@ -1854,11 +1919,11 @@
  5662.                while test -h "$potlib" 2>/dev/null; do
  5663.              potliblink=`ls -ld $potlib | sed 's/.* -> //'`
  5664.              case "$potliblink" in
  5665. -            /*) potlib="$potliblink";;
  5666. +            [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  5667.              *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  5668.              esac
  5669.                done
  5670. -              if eval $file_magic_cmd \"\$potlib\" \
  5671. +              if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  5672.               | sed 10q \
  5673.               | egrep "$file_magic_regex" > /dev/null; then
  5674.              newdeplibs="$newdeplibs $a_deplib"
  5675. @@ -1881,7 +1946,8 @@
  5676.          fi
  5677.        done # Gone through all deplibs.
  5678.        ;;
  5679. -    none | unknown | *) newdeplibs=""
  5680. +    none | unknown | *)
  5681. +      newdeplibs=""
  5682.        if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  5683.             -e 's/ -[LR][^ ]*//g' -e 's/[     ]//g' |
  5684.           grep . >/dev/null; then
  5685. @@ -1923,8 +1989,6 @@
  5686.          else
  5687.            build_libtool_libs=no
  5688.          fi
  5689. -        dlname=
  5690. -        library_names=
  5691.        else
  5692.          echo "*** The inter-library dependencies that have been dropped here will be"
  5693.          echo "*** automatically added whenever a program is linked with this library"
  5694. @@ -1931,13 +1995,17 @@
  5695.          echo "*** or is declared to -dlopen it."
  5696.        fi
  5697.      fi
  5698. +    # Done checking deplibs!
  5699. +    deplibs=$newdeplibs
  5700.        fi
  5701.  
  5702. -      # test again, we may have decided not to build it any more
  5703. +      # All the library-specific variables (install_libdir is set above).
  5704. +      library_names=
  5705. +      old_library=
  5706. +      dlname=
  5707. +      
  5708. +      # Test again, we may have decided not to build it any more
  5709.        if test "$build_libtool_libs" = yes; then
  5710. -    deplibs=$newdeplibs
  5711. -    # Done checking deplibs!
  5712.      # Get the real and link names of the library.
  5713.      eval library_names=\"$library_names_spec\"
  5714.      set dummy $library_names
  5715. @@ -1960,7 +2028,10 @@
  5716.      # (e.g. aix) incase we are running --disable-static
  5717.      for obj in $libobjs; do
  5718.        oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
  5719. -      test -f $oldobj || ${LN_S} $obj $oldobj
  5720. +      if test ! -f $oldobj; then
  5721. +        $show "${LN_S} $obj $oldobj"
  5722. +        $run ${LN_S} $obj $oldobj || exit $?
  5723. +      fi
  5724.      done
  5725.  
  5726.      # Use standard objects if they are pic
  5727. @@ -1971,11 +2042,25 @@
  5728.          eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  5729.        fi
  5730.      else
  5731. +      gentop="$output_objdir/${outputname}x"
  5732. +      $show "${rm}r $gentop"
  5733. +      $run ${rm}r "$gentop"
  5734. +      $show "mkdir $gentop"
  5735. +      $run mkdir "$gentop"
  5736. +      status=$?
  5737. +      if test $status -ne 0 && test ! -d "$gentop"; then
  5738. +        exit $status
  5739. +      fi
  5740. +      generated="$generated $gentop"
  5741. +      
  5742.        for xlib in $convenience; do
  5743.          # Extract the objects.
  5744. -        xdir="$xlib"x
  5745. -        generated="$generated $xdir"
  5746. +        case "$xlib" in
  5747. +        [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  5748. +        *) xabs=`pwd`"/$xlib" ;;
  5749. +        esac
  5750.          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  5751. +        xdir="$gentop/$xlib"
  5752.  
  5753.          $show "${rm}r $xdir"
  5754.          $run ${rm}r "$xdir"
  5755. @@ -1985,8 +2070,8 @@
  5756.          if test $status -ne 0 && test ! -d "$xdir"; then
  5757.            exit $status
  5758.          fi
  5759. -        $show "(cd $xdir && $AR x ../$xlib)"
  5760. -        $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  5761. +        $show "(cd $xdir && $AR x $xabs)"
  5762. +        $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  5763.  
  5764.          libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  5765.        done
  5766. @@ -1994,7 +2079,6 @@
  5767.  
  5768.      if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  5769.        eval flag=\"$thread_safe_flag_spec\"
  5770. -
  5771.        linkopts="$linkopts $flag"
  5772.      fi
  5773.  
  5774. @@ -2002,7 +2086,7 @@
  5775.      if test -z "$export_symbols"; then
  5776.        if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  5777.          $show "generating symbol list for \`$libname.la'"
  5778. -        export_symbols="$objdir/$libname.exp"
  5779. +        export_symbols="$output_objdir/$libname.exp"
  5780.          $run $rm $export_symbols
  5781.          eval cmds=\"$export_symbols_cmds\"
  5782.          IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  5783. @@ -2065,7 +2149,7 @@
  5784.      $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  5785.        fi
  5786.  
  5787. -      if test -n "$dlfiles$dlprefiles"; then
  5788. +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  5789.      $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  5790.        fi
  5791.  
  5792. @@ -2167,11 +2251,6 @@
  5793.      fi 
  5794.        fi
  5795.      
  5796. -      if test "$dlself" = yes && test "$export_dynamic" = no; then
  5797. -    $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
  5798. -    exit 1
  5799. -      fi
  5800. -
  5801.        if test -n "$rpath$xrpath"; then
  5802.      # If the user specified any rpath flags, then add them.
  5803.      for libdir in $rpath $xrpath; do
  5804. @@ -2207,7 +2286,6 @@
  5805.          fi
  5806.        else
  5807.          eval flag=\"$hardcode_libdir_flag_spec\"
  5808. -
  5809.          rpath="$rpath $flag"
  5810.        fi
  5811.      elif test -n "$runpath_var"; then
  5812. @@ -2244,7 +2322,6 @@
  5813.          fi
  5814.        else
  5815.          eval flag=\"$hardcode_libdir_flag_spec\"
  5816. -
  5817.          rpath="$rpath $flag"
  5818.        fi
  5819.      elif test -n "$runpath_var"; then
  5820. @@ -2269,6 +2346,16 @@
  5821.      output_objdir="$output_objdir/$objdir"
  5822.        fi
  5823.  
  5824. +      # Create the binary in the object directory, then wrap it.
  5825. +      if test ! -d $output_objdir; then
  5826. +    $show "$mkdir $output_objdir"
  5827. +    $run $mkdir $output_objdir
  5828. +    status=$?
  5829. +    if test $status -ne 0 && test ! -d $output_objdir; then
  5830. +      exit $status
  5831. +    fi
  5832. +      fi
  5833. +
  5834.        if test -n "$libobjs" && test "$build_old_libs" = yes; then
  5835.      # Transform all the library objects into standard objects.
  5836.      compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  5837. @@ -2289,24 +2376,15 @@
  5838.      "") ;;
  5839.      *.c)
  5840.        # Discover the nlist of each of the dlfiles.
  5841. -      nlist="$objdir/${output}.nm"
  5842. +      nlist="$output_objdir/${outputname}.nm"
  5843.  
  5844. -      if test -d $objdir; then
  5845. -        $show "$rm $nlist ${nlist}S ${nlist}T"
  5846. -        $run $rm "$nlist" "${nlist}S" "${nlist}T"
  5847. -      else
  5848. -        $show "$mkdir $objdir"
  5849. -        $run $mkdir $objdir
  5850. -        status=$?
  5851. -        if test $status -ne 0 && test ! -d $objdir; then
  5852. -          exit $status
  5853. -        fi
  5854. -      fi
  5855. +      $show "$rm $nlist ${nlist}S ${nlist}T"
  5856. +      $run $rm "$nlist" "${nlist}S" "${nlist}T"
  5857.  
  5858.        # Parse the name list into a source file.
  5859. -      $show "creating $objdir/$dlsyms"
  5860. +      $show "creating $output_objdir/$dlsyms"
  5861.  
  5862. -      $echo > "$objdir/$dlsyms" "\
  5863. +      test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  5864.  /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  5865.  /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  5866.  
  5867. @@ -2323,7 +2401,7 @@
  5868.        if test "$dlself" = yes; then
  5869.          $show "generating symbol list for \`$output'"
  5870.  
  5871. -        echo ': @PROGRAM@ ' > "$nlist"
  5872. +        test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  5873.  
  5874.          # Add our own program objects to the symbol list.
  5875.          progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  5876. @@ -2344,13 +2422,12 @@
  5877.  
  5878.          # Prepare the list of exported symbols
  5879.          if test -z "$export_symbols"; then
  5880. -          export_symbols="$objdir/$output.exp"
  5881. +          export_symbols="$output_objdir/$output.exp"
  5882.            $run $rm $export_symbols
  5883.            $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  5884.          else
  5885. -          $run $rm $export_symbols
  5886. -          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
  5887. -          $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
  5888. +          $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  5889. +          $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  5890.            $run eval 'mv "$nlist"T "$nlist"'
  5891.          fi
  5892.        fi
  5893. @@ -2426,7 +2503,7 @@
  5894.        fi
  5895.  
  5896.        pic_flag_for_symtable=
  5897. -          case "$host" in
  5898. +      case "$host" in
  5899.        # compiling the symbol table file with pic_flag works around
  5900.        # a FreeBSD bug that causes programs to crash when -lm is
  5901.        # linked before any other PIC object.  But we must not use
  5902. @@ -2440,12 +2517,16 @@
  5903.        esac
  5904.  
  5905.        # Now compile the dynamic symbol file.
  5906. -      $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  5907. -      $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  5908. +      $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  5909. +      $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  5910. +
  5911. +      # Clean up the generated files.
  5912. +      $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  5913. +      $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  5914.  
  5915.        # Transform the symbol file into the correct name.
  5916. -      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  5917. -      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
  5918. +      compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  5919. +      finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  5920.        ;;
  5921.      *)
  5922.        $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  5923. @@ -2470,7 +2551,15 @@
  5924.      # We have no uninstalled library dependencies, so finalize right now.
  5925.      $show "$link_command"
  5926.      $run eval "$link_command"
  5927. -    exit $?
  5928. +    status=$?
  5929. +    
  5930. +    # Delete the generated files.
  5931. +    if test -n "$dlsyms"; then
  5932. +      $show "$rm $output_objdir/${outputname}S.${objext}"
  5933. +      $run $rm "$output_objdir/${outputname}S.${objext}"
  5934. +    fi
  5935. +
  5936. +    exit $status
  5937.        fi
  5938.  
  5939.        if test -n "$shlibpath_var"; then
  5940. @@ -2478,7 +2567,7 @@
  5941.      rpath=
  5942.      for dir in $temp_rpath; do
  5943.        case "$dir" in
  5944. -      /* | [A-Za-z]:[/\\]*)
  5945. +      [\\/]* | [A-Za-z]:[\\/]*)
  5946.          # Absolute path.
  5947.          rpath="$rpath$dir:"
  5948.          ;;
  5949. @@ -2524,7 +2613,6 @@
  5950.      link_command="$compile_var$compile_command$compile_rpath"
  5951.      relink_command="$finalize_var$finalize_command$finalize_rpath"
  5952.      
  5953. -    # AGH! Flame the AIX and HP-UX people for me, will ya?
  5954.      $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  5955.      $echo "$modename: \`$output' will be relinked during installation" 1>&2
  5956.        else
  5957. @@ -2545,17 +2633,7 @@
  5958.        # Replace the output file specification.
  5959.        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  5960.        
  5961. -      # Create the binary in the object directory, then wrap it.
  5962. -      if test ! -d $output_objdir; then
  5963. -    $show "$mkdir $output_objdir"
  5964. -    $run $mkdir $output_objdir
  5965. -    status=$?
  5966. -    if test $status -ne 0 && test ! -d $objdir; then
  5967. -      exit $status
  5968. -    fi
  5969. -      fi
  5970. -
  5971. -      # Delete the old output file.
  5972. +      # Delete the old output files.
  5973.        $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  5974.  
  5975.        $show "$link_command"
  5976. @@ -2572,7 +2650,7 @@
  5977.        # Quote $echo for shipping.
  5978.        if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  5979.      case "$0" in
  5980. -    /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
  5981. +    [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  5982.      *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
  5983.      esac
  5984.      qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  5985. @@ -2649,7 +2727,7 @@
  5986.      # If there was a directory component, then change thisdir.
  5987.      if test \"x\$destdir\" != \"x\$file\"; then
  5988.        case \"\$destdir\" in
  5989. -      /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
  5990. +      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
  5991.        *) thisdir=\"\$thisdir/\$destdir\" ;;
  5992.        esac
  5993.      fi
  5994. @@ -2787,31 +2865,58 @@
  5995.      addlibs="$old_convenience"
  5996.        fi
  5997.  
  5998. -      # Add in members from convenience archives.
  5999. -      for xlib in $addlibs; do
  6000. -    # Extract the objects.
  6001. -    xdir="$xlib"x
  6002. -    generated="$generated $xdir"
  6003. -    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  6004. -
  6005. -    $show "${rm}r $xdir"
  6006. -    $run ${rm}r "$xdir"
  6007. -    $show "mkdir $xdir"
  6008. -    $run mkdir "$xdir"
  6009. +      if test -n "$addlibs"; then
  6010. +    gentop="$output_objdir/${outputname}x"
  6011. +    $show "${rm}r $gentop"
  6012. +    $run ${rm}r "$gentop"
  6013. +    $show "mkdir $gentop"
  6014. +    $run mkdir "$gentop"
  6015.      status=$?
  6016. -    if test $status -ne 0 && test ! -d "$xdir"; then
  6017. +    if test $status -ne 0 && test ! -d "$gentop"; then
  6018.        exit $status
  6019.      fi
  6020. -    $show "(cd $xdir && $AR x ../$xlib)"
  6021. -    $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
  6022. +    generated="$generated $gentop"
  6023. +      
  6024. +    # Add in members from convenience archives.
  6025. +    for xlib in $addlibs; do
  6026. +      # Extract the objects.
  6027. +      case "$xlib" in
  6028. +      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  6029. +      *) xabs=`pwd`"/$xlib" ;;
  6030. +      esac
  6031. +      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  6032. +      xdir="$gentop/$xlib"
  6033.  
  6034. -    oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  6035. -      done
  6036. +      $show "${rm}r $xdir"
  6037. +      $run ${rm}r "$xdir"
  6038. +      $show "mkdir $xdir"
  6039. +      $run mkdir "$xdir"
  6040. +      status=$?
  6041. +      if test $status -ne 0 && test ! -d "$xdir"; then
  6042. +        exit $status
  6043. +      fi
  6044. +      $show "(cd $xdir && $AR x $xabs)"
  6045. +      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  6046. +
  6047. +      oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  6048. +    done
  6049. +      fi
  6050.  
  6051.        # Do each command in the archive commands.
  6052.        if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  6053.      eval cmds=\"$old_archive_from_new_cmds\"
  6054.        else
  6055. +    # Ensure that we have .o objects in place incase we decided
  6056. +    # not to build a shared library, and have fallen back to building
  6057. +    # static libs even though --disable-static was passed!
  6058. +    for oldobj in $oldobjs; do
  6059. +      if test ! -f $oldobj; then
  6060. +        obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
  6061. +        $show "${LN_S} $obj $oldobj"
  6062. +        $run ${LN_S} $obj $oldobj || exit $?
  6063. +      fi
  6064. +    done
  6065. +
  6066.      eval cmds=\"$old_archive_cmds\"
  6067.        fi
  6068.        IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
  6069. @@ -2845,9 +2950,20 @@
  6070.  
  6071.        # Only create the output if not a dry run.
  6072.        if test -z "$run"; then
  6073. -    $echo > $output "\
  6074. -# $output - a libtool library file
  6075. +    for installed in no yes; do
  6076. +      if test "$installed" = yes; then
  6077. +        if test -z "$install_libdir"; then
  6078. +          break
  6079. +        fi
  6080. +        output="$output_objdir/$outputname"i
  6081. +      fi
  6082. +      $rm $output
  6083. +      $echo > $output "\
  6084. +# $outputname - a libtool library file
  6085.  # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  6086. +#
  6087. +# Please DO NOT delete this file!
  6088. +# It is necessary for linking the library.
  6089.  
  6090.  # The name that we can dlopen(3).
  6091.  dlname='$dlname'
  6092. @@ -2867,15 +2983,12 @@
  6093.  revision=$revision
  6094.  
  6095.  # Is this an already installed library?
  6096. -installed=no
  6097. +installed=$installed
  6098.  
  6099.  # Directory that this library needs to be installed in:
  6100.  libdir='$install_libdir'\
  6101.  "
  6102. -
  6103. -    $rm "$output_objdir/$outputname"i
  6104. -    sed 's/^installed=no$/installed=yes/' \
  6105. -      < "$output" > "$output_objdir/$outputname"i || exit 1
  6106. +    done
  6107.        fi
  6108.  
  6109.        # Do a symbolic link so that the libtool archive can be found in
  6110. @@ -3012,7 +3125,7 @@
  6111.        fi
  6112.      fi
  6113.      case "$destdir" in
  6114. -    /* | [A-Za-z]:[/\\]*) ;;
  6115. +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  6116.      *)
  6117.        for file in $files; do
  6118.      case "$file" in
  6119. @@ -3123,12 +3236,6 @@
  6120.      # Install the pseudo-library for information purposes.
  6121.      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  6122.      instname="$dir/$name"i
  6123. -    if test ! -f "$instname"; then
  6124. -      # Just in case it was removed...
  6125. -      $show "Creating $instname"
  6126. -      $rm "$instname"
  6127. -      sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
  6128. -    fi
  6129.      $show "$install_prog $instname $destdir/$name"
  6130.      $run eval "$install_prog $instname $destdir/$name" || exit $?
  6131.  
  6132. @@ -3226,21 +3333,29 @@
  6133.  
  6134.        outputname=
  6135.        if test "$fast_install" = no && test -n "$relink_command"; then
  6136. -        if test "$finalize" = yes; then
  6137. -          outputname="/tmp/$$-$file"
  6138. +        if test "$finalize" = yes && test -z "$run"; then
  6139. +          tmpdir="/tmp"
  6140. +          test -n "$TMPDIR" && tmpdir="$TMPDIR"
  6141. +          tmpdir="$tmpdir/libtool-$$"
  6142. +          if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
  6143. +          else
  6144. +        $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  6145. +        continue
  6146. +          fi
  6147. +          outputname="$tmpdir/$file"
  6148.            # Replace the output file specification.
  6149.            relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  6150.  
  6151. -          $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
  6152.            $show "$relink_command"
  6153.            if $run eval "$relink_command"; then :
  6154.            else
  6155.          $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  6156. +        ${rm}r "$tmpdir"
  6157.          continue
  6158.            fi
  6159.            file="$outputname"
  6160.          else
  6161. -          $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
  6162. +          $echo "$modename: warning: cannot relink \`$file'" 1>&2
  6163.          fi
  6164.        else
  6165.          # Install the binary that we compiled earlier.
  6166. @@ -3250,7 +3365,7 @@
  6167.  
  6168.      $show "$install_prog$stripme $file $destfile"
  6169.      $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  6170. -    test -n "$outputname" && $rm $outputname
  6171. +    test -n "$outputname" && ${rm}r "$tmpdir"
  6172.      ;;
  6173.        esac
  6174.      done
  6175. @@ -3718,6 +3833,8 @@
  6176.    -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  6177.    -export-symbols SYMFILE
  6178.              try to export only the symbols listed in SYMFILE
  6179. +  -export-symbols-regex REGEX
  6180. +            try to export only the symbols matching REGEX
  6181.    -LLIBDIR          search LIBDIR for required installed libraries
  6182.    -lNAME            OUTPUT-FILE requires the installed library libNAME
  6183.    -module           build a library that can dlopened
  6184. @@ -3748,7 +3865,7 @@
  6185.    ;;
  6186.  
  6187.  uninstall)
  6188. -  $echo
  6189. +  $echo \
  6190.  "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  6191.  
  6192.  Remove libraries from an installation directory.
  6193. --- ./ltconfig    Tue Jul  6 10:33:41 1999
  6194. +++ ../ORBit-0.4.91/./ltconfig    Tue Jul  6 18:28:56 1999
  6195. @@ -2,7 +2,7 @@
  6196.  
  6197.  # ltconfig - Create a system-specific libtool.
  6198.  # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  6199. -# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  6200. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  6201.  #
  6202.  # This file is free software; you can redistribute it and/or modify it
  6203.  # under the terms of the GNU General Public License as published by
  6204. @@ -32,12 +32,8 @@
  6205.    # Discard the --no-reexec flag, and continue.
  6206.    shift
  6207.  elif test "X$1" = X--fallback-echo; then
  6208. -  # used as fallback echo
  6209. -  shift
  6210. -  cat <<EOF
  6211. -$*
  6212. -EOF
  6213. -  exit 0
  6214. +  # Avoid inline document here, it may be left over
  6215. +  :
  6216.  elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  6217.    # Yippee, $echo works!
  6218.    :
  6219. @@ -46,6 +42,15 @@
  6220.    exec "$SHELL" "$0" --no-reexec ${1+"$@"}
  6221.  fi
  6222.  
  6223. +if test "X$1" = X--fallback-echo; then
  6224. +  # used as fallback echo
  6225. +  shift
  6226. +  cat <<EOF
  6227. +$*
  6228. +EOF
  6229. +  exit 0
  6230. +fi
  6231. +
  6232.  # Find the correct PATH separator.  Usually this is `:', but
  6233.  # DJGPP uses `;' like DOS.
  6234.  if test "X${PATH_SEPARATOR+set}" != "Xset"; then
  6235. @@ -82,7 +87,7 @@
  6236.  
  6237.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  6238.    for dir in $PATH /usr/ucb; do
  6239. -    if test -f $dir/echo &&
  6240. +    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  6241.         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  6242.         test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  6243.        echo="$dir/echo"
  6244. @@ -97,7 +102,8 @@
  6245.         test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  6246.        # This shell has a builtin print -r that does the trick.
  6247.        echo='print -r'
  6248. -    elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
  6249. +    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  6250. +     test "X$CONFIG_SHELL" != X/bin/ksh; then
  6251.        # If we have ksh, try running ltconfig again with it.
  6252.        ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  6253.        export ORIGINAL_CONFIG_SHELL
  6254. @@ -163,8 +169,8 @@
  6255.  # Constants:
  6256.  PROGRAM=ltconfig
  6257.  PACKAGE=libtool
  6258. -VERSION=1.2f
  6259. -TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
  6260. +VERSION=1.3.2
  6261. +TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)"
  6262.  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
  6263.  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
  6264.  rm="rm -f"
  6265. @@ -179,6 +185,7 @@
  6266.  enable_static=yes
  6267.  enable_fast_install=yes
  6268.  enable_dlopen=unknown
  6269. +enable_win32_dll=no
  6270.  ltmain=
  6271.  silent=
  6272.  srcdir=
  6273. @@ -200,11 +207,14 @@
  6274.  old_CC="$CC"
  6275.  old_CFLAGS="$CFLAGS"
  6276.  old_CPPFLAGS="$CPPFLAGS"
  6277. +old_LDFLAGS="$LDFLAGS"
  6278.  old_LD="$LD"
  6279.  old_LN_S="$LN_S"
  6280. +old_LIBS="$LIBS"
  6281.  old_NM="$NM"
  6282.  old_RANLIB="$RANLIB"
  6283.  old_DLLTOOL="$DLLTOOL"
  6284. +old_OBJDUMP="$OBJDUMP"
  6285.  old_AS="$AS"
  6286.  
  6287.  # Parse the command line options.
  6288. @@ -235,7 +245,7 @@
  6289.      --disable-static       do not build static libraries
  6290.      --disable-fast-install do not optimize for fast installation
  6291.      --enable-dlopen        enable dlopen support
  6292. -    --enable-dlopen-self   enable support for dlopening programs
  6293. +    --enable-win32-dll     enable building dlls on win32 hosts
  6294.      --help                 display this help and exit
  6295.      --no-verify            do not verify that HOST is a valid host type
  6296.  -o, --output=FILE          specify the output file [default=$default_ofile]
  6297. @@ -269,6 +279,8 @@
  6298.  
  6299.    --enable-dlopen) enable_dlopen=yes ;;
  6300.  
  6301. +  --enable-win32-dll) enable_win32_dll=yes ;;
  6302. +
  6303.    --quiet | --silent) silent=yes ;;
  6304.  
  6305.    --srcdir) prev=srcdir ;;
  6306. @@ -463,6 +475,9 @@
  6307.  # Set a sane default for `AR'.
  6308.  test -z "$AR" && AR=ar
  6309.  
  6310. +# Set a sane default for `OBJDUMP'.
  6311. +test -z "$OBJDUMP" && OBJDUMP=objdump
  6312. +
  6313.  # If RANLIB is not set, then run the test.
  6314.  if test "${RANLIB+set}" != "set"; then
  6315.    result=no
  6316. @@ -471,7 +486,7 @@
  6317.    IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  6318.    for dir in $PATH; do
  6319.      test -z "$dir" && dir=.
  6320. -    if test -f $dir/ranlib; then
  6321. +    if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
  6322.        RANLIB="ranlib"
  6323.        result="ranlib"
  6324.        break
  6325. @@ -487,8 +502,9 @@
  6326.    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  6327.  fi
  6328.  
  6329. -# Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
  6330. +# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
  6331.  test -z "$DLLTOOL" && DLLTOOL=dlltool
  6332. +test -z "$OBJDUMP" && OBJDUMP=objdump
  6333.  test -z "$AS" && AS=as
  6334.  
  6335.  # Check to see if we are using GCC.
  6336. @@ -498,9 +514,8 @@
  6337.      echo $ac_n "checking for gcc... $ac_c" 1>&6
  6338.      IFS="${IFS=     }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  6339.      for dir in $PATH; do
  6340. -      IFS="$save_ifs"
  6341.        test -z "$dir" && dir=.
  6342. -      if test -f $dir/gcc; then
  6343. +      if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
  6344.      CC="gcc"
  6345.      break
  6346.        fi
  6347. @@ -521,7 +536,7 @@
  6348.      cc_rejected=no
  6349.      for dir in $PATH; do
  6350.        test -z "$dir" && dir=.
  6351. -      if test -f $dir/cc; then
  6352. +      if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
  6353.      if test "$dir/cc" = "/usr/ucb/cc"; then
  6354.        cc_rejected=yes
  6355.        continue
  6356. @@ -561,7 +576,7 @@
  6357.    # Now see if the compiler is really GCC.
  6358.    with_gcc=no
  6359.    echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
  6360. -  echo "$progname:564: checking whether we are using GNU C" >&5
  6361. +  echo "$progname:579: checking whether we are using GNU C" >&5
  6362.  
  6363.    $rm conftest.c
  6364.    cat > conftest.c <<EOF
  6365. @@ -569,7 +584,7 @@
  6366.    yes;
  6367.  #endif
  6368.  EOF
  6369. -  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  6370. +  if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  6371.      with_gcc=yes
  6372.    fi
  6373.    $rm conftest.c
  6374. @@ -583,8 +598,8 @@
  6375.  echo $ac_n "checking for object suffix... $ac_c" 1>&6
  6376.  $rm conftest*
  6377.  echo 'int i = 1;' > conftest.c
  6378. -echo "$progname:586: checking for object suffix" >& 5
  6379. -if { (eval echo $progname:587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  6380. +echo "$progname:601: checking for object suffix" >& 5
  6381. +if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  6382.    # Append any warnings to the config.log.
  6383.    cat conftest.err 1>&5
  6384.  
  6385. @@ -635,6 +650,11 @@
  6386.      # like `-m68040'.
  6387.      pic_flag='-m68020 -resident32 -malways-restore-a4'
  6388.      ;;
  6389. +  sysv4*MP*)
  6390. +    if test -d /usr/nec; then
  6391. +       pic_flag=-Kconform_pic
  6392. +    fi
  6393. +    ;;
  6394.    *)
  6395.      pic_flag='-fPIC'
  6396.      ;;
  6397. @@ -688,7 +708,7 @@
  6398.      wl='-Qoption ld '
  6399.      ;;
  6400.  
  6401. -  sysv4.2uw2* | sysv4.3* | sysv5*)
  6402. +  sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  6403.      pic_flag='-KPIC'
  6404.      link_static_flag='-Bstatic'
  6405.      wl='-Wl,'
  6406. @@ -698,7 +718,12 @@
  6407.      pic_flag='-pic'
  6408.      link_static_flag='-Bstatic'
  6409.      ;;
  6410. -
  6411. +  sysv4*MP*)
  6412. +    if test -d /usr/nec ;then
  6413. +      pic_flag='-Kconform_pic'
  6414. +      link_static_flag='-Bstatic'
  6415. +    fi
  6416. +    ;;
  6417.    *)
  6418.      can_build_shared=no
  6419.      ;;
  6420. @@ -714,8 +739,8 @@
  6421.    echo "int some_variable = 0;" > conftest.c
  6422.    save_CFLAGS="$CFLAGS"
  6423.    CFLAGS="$CFLAGS $pic_flag -DPIC"
  6424. -  echo "$progname:717: checking if $compiler PIC flag $pic_flag works" >&5
  6425. -  if { (eval echo $progname:718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  6426. +  echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5
  6427. +  if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  6428.      # Append any warnings to the config.log.
  6429.      cat conftest.err 1>&5
  6430.      
  6431. @@ -753,16 +778,26 @@
  6432.  
  6433.  # Check to see if options -o and -c are simultaneously supported by compiler
  6434.  echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
  6435. +$rm -r conftest 2>/dev/null
  6436. +mkdir conftest
  6437. +cd conftest
  6438.  $rm conftest*
  6439.  echo "int some_variable = 0;" > conftest.c
  6440. +mkdir out
  6441. +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  6442. +# that will create temporary files in the current directory regardless of
  6443. +# the output directory.  Thus, making CWD read-only will cause this test
  6444. +# to fail, enabling locking or at least warning the user not to do parallel
  6445. +# builds.
  6446. +chmod -w .
  6447.  save_CFLAGS="$CFLAGS"
  6448. -CFLAGS="$CFLAGS -c -o conftest2.o"
  6449. -echo "$progname:760: checking if $compiler supports -c -o file.o" >&5
  6450. -if { (eval echo $progname:761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest2.o; then
  6451. +CFLAGS="$CFLAGS -o out/conftest2.o"
  6452. +echo "$progname:795: checking if $compiler supports -c -o file.o" >&5
  6453. +if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  6454.  
  6455.    # The compiler can only warn and ignore the option if not recognized
  6456.    # So say no if there are warnings
  6457. -    if test -s conftest.err; then
  6458. +    if test -s out/conftest.err; then
  6459.        echo "$ac_t"no 1>&6
  6460.        compiler_c_o=no
  6461.      else
  6462. @@ -771,12 +806,17 @@
  6463.      fi
  6464.  else
  6465.    # Append any errors to the config.log.
  6466. -  cat conftest.err 1>&5
  6467. +  cat out/conftest.err 1>&5
  6468.    compiler_c_o=no
  6469.    echo "$ac_t"no 1>&6
  6470.  fi
  6471.  CFLAGS="$save_CFLAGS"
  6472. -$rm conftest*
  6473. +chmod u+w .
  6474. +$rm conftest* out/*
  6475. +rmdir out
  6476. +cd ..
  6477. +rmdir conftest
  6478. +$rm -r conftest 2>/dev/null
  6479.  
  6480.  if test x"$compiler_c_o" = x"yes"; then
  6481.    # Check to see if we can write to a .lo
  6482. @@ -785,8 +825,8 @@
  6483.    echo "int some_variable = 0;" > conftest.c
  6484.    save_CFLAGS="$CFLAGS"
  6485.    CFLAGS="$CFLAGS -c -o conftest.lo"
  6486. -  echo "$progname:788: checking if $compiler supports -c -o file.lo" >&5
  6487. -if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  6488. +  echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5
  6489. +if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  6490.  
  6491.      # The compiler can only warn and ignore the option if not recognized
  6492.      # So say no if there are warnings
  6493. @@ -837,8 +877,8 @@
  6494.    echo "int some_variable = 0;" > conftest.c
  6495.    save_CFLAGS="$CFLAGS"
  6496.    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
  6497. -  echo "$progname:840: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  6498. -  if { (eval echo $progname:841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  6499. +  echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  6500. +  if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  6501.  
  6502.      # The compiler can only warn and ignore the option if not recognized
  6503.      # So say no if there are warnings
  6504. @@ -881,8 +921,8 @@
  6505.  echo 'main(){return(0);}' > conftest.c
  6506.  save_LDFLAGS="$LDFLAGS"
  6507.  LDFLAGS="$LDFLAGS $link_static_flag"
  6508. -echo "$progname:884: checking if $compiler static flag $link_static_flag works" >&5
  6509. -if { (eval echo $progname:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6510. +echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5
  6511. +if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6512.    echo "$ac_t$link_static_flag" 1>&6
  6513.  else
  6514.    echo "$ac_t"none 1>&6
  6515. @@ -894,9 +934,9 @@
  6516.  if test -z "$LN_S"; then
  6517.    # Check to see if we can use ln -s, or we need hard links.
  6518.    echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
  6519. -  $rm conftestdata
  6520. -  if ln -s X conftestdata 2>/dev/null; then
  6521. -    $rm conftestdata
  6522. +  $rm conftest.dat
  6523. +  if ln -s X conftest.dat 2>/dev/null; then
  6524. +    $rm conftest.dat
  6525.      LN_S="ln -s"
  6526.    else
  6527.      LN_S=ln
  6528. @@ -914,11 +954,11 @@
  6529.    if test "$with_gcc" = yes; then
  6530.      # Check if gcc -print-prog-name=ld gives a path.
  6531.      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
  6532. -    echo "$progname:917: checking for ld used by GCC" >&5
  6533. +    echo "$progname:957: checking for ld used by GCC" >&5
  6534.      ac_prog=`($CC -print-prog-name=ld) 2>&5`
  6535.      case "$ac_prog" in
  6536.      # Accept absolute paths.
  6537. -    /* | [A-Za-z]:[\\/]*)
  6538. +    [\\/]* | [A-Za-z]:[\\/]*)
  6539.        re_direlt='/[^/][^/]*/\.\./'
  6540.        # Canonicalize the path of ld
  6541.        ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  6542. @@ -938,10 +978,10 @@
  6543.      esac
  6544.    elif test "$with_gnu_ld" = yes; then
  6545.      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
  6546. -    echo "$progname:941: checking for GNU ld" >&5
  6547. +    echo "$progname:981: checking for GNU ld" >&5
  6548.    else
  6549.      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  6550. -    echo "$progname:944: checking for non-GNU ld" >&5
  6551. +    echo "$progname:984: checking for non-GNU ld" >&5
  6552.    fi
  6553.  
  6554.    if test -z "$LD"; then
  6555. @@ -948,7 +988,7 @@
  6556.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  6557.      for ac_dir in $PATH; do
  6558.        test -z "$ac_dir" && ac_dir=.
  6559. -      if test -f "$ac_dir/$ac_prog"; then
  6560. +      if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  6561.      LD="$ac_dir/$ac_prog"
  6562.      # Check to see if the program is GNU ld.  I'd rather use --version,
  6563.      # but apparently some GNU ld's only accept -v.
  6564. @@ -1015,7 +1055,12 @@
  6565.  # it will be wrapped by ` (' and `)$', so one must not match beginning or
  6566.  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  6567.  # as well as any symbol that contains `d'.
  6568. -exclude_expsyms=
  6569. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  6570. +# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  6571. +# platforms (ab)use it in PIC code, but their linkers get confused if
  6572. +# the symbol is explicitly referenced.  Since portable code cannot
  6573. +# rely on this symbol name, it's probably fine to never include it in
  6574. +# preloaded symbol tables.
  6575.  
  6576.  case "$host_os" in
  6577.  cygwin* | mingw*)
  6578. @@ -1027,10 +1072,6 @@
  6579.    fi
  6580.    ;;
  6581.  
  6582. -freebsd2* | sunos4*)
  6583. -  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  6584. -  ;;
  6585. -
  6586.  esac
  6587.  
  6588.  ld_shlibs=yes
  6589. @@ -1058,18 +1099,21 @@
  6590.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  6591.      hardcode_libdir_flag_spec='-L$libdir'
  6592.      hardcode_minus_L=yes
  6593. -    ;;
  6594.  
  6595. -  sunos4*)
  6596. -    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  6597. -    wlarc=
  6598. -    hardcode_direct=yes
  6599. -    hardcode_minus_L=yes
  6600. -    hardcode_shlibpath_var=no
  6601. +    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  6602. +    # that the semantics of dynamic libraries on AmigaOS, at least up
  6603. +    # to version 4, is to share data among multiple programs linked
  6604. +    # with the same dynamic library.  Since this doesn't match the
  6605. +    # behavior of shared libraries on other platforms, we can use
  6606. +    # them.
  6607. +    ld_shlibs=no
  6608.      ;;
  6609.  
  6610.    beos*)
  6611.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  6612. +      allow_undefined_flag=unsupported
  6613. +      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6614. +      # support --undefined.  This deserves some investigation.  FIXME
  6615.        archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  6616.      else
  6617.        ld_shlibs=no
  6618. @@ -1087,7 +1131,7 @@
  6619.      # then regenerate the def file from the symbol export list, so that
  6620.      # the compiled dll only exports the symbol export list.
  6621.      export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~
  6622. -      sed -e "/^# \/\* ltdll.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  6623. +      sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  6624.        (cd $objdir && $CC -c $soname-ltdll.c)~
  6625.        $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def  $objdir/$soname-ltdll.$objext $libobjs~
  6626.        sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  6627. @@ -1095,7 +1139,7 @@
  6628.      archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  6629.        _lt_hint=1;
  6630.        for symbol in `cat $export_symbols`; do
  6631. -        echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  6632. +    echo "    \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  6633.      _lt_hint=`expr 1 + \$_lt_hint`;
  6634.        done~
  6635.        $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
  6636. @@ -1107,6 +1151,44 @@
  6637.        old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
  6638.      ;;
  6639.  
  6640. +  netbsd*)
  6641. +    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  6642. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  6643. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6644. +    else
  6645. +      archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
  6646. +      # can we support soname and/or expsyms with a.out? -oliva
  6647. +    fi
  6648. +    ;;
  6649. +
  6650. +  solaris*)
  6651. +    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  6652. +      ld_shlibs=no
  6653. +      cat <<EOF 1>&2
  6654. +
  6655. +*** Warning: The releases 2.8.* of the GNU linker cannot reliably
  6656. +*** create shared libraries on Solaris systems.  Therefore, libtool
  6657. +*** is disabling shared libraries support.  We urge you to upgrade GNU
  6658. +*** binutils to release 2.9.1 or newer.  Another option is to modify
  6659. +*** your PATH or compiler configuration so that the native linker is
  6660. +*** used, and then restart.
  6661. +
  6662. +EOF
  6663. +    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  6664. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  6665. +      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6666. +    else
  6667. +      ld_shlibs=no
  6668. +    fi
  6669. +    ;;      
  6670. +
  6671. +  sunos4*)
  6672. +    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
  6673. +    wlarc=
  6674. +    hardcode_direct=yes
  6675. +    hardcode_shlibpath_var=no
  6676. +    ;;
  6677. +
  6678.    *)
  6679.      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  6680.        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  6681. @@ -1121,7 +1203,15 @@
  6682.      runpath_var=LD_RUN_PATH
  6683.      hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  6684.      export_dynamic_flag_spec='${wl}--export-dynamic'
  6685. -    whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6686. +    case $host_os in
  6687. +    cygwin* | mingw*)
  6688. +      # dlltool doesn't understand --whole-archive et. al.
  6689. +      whole_archive_flag_spec=
  6690. +      ;;
  6691. +    *)
  6692. +      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6693. +      ;;
  6694. +    esac
  6695.    fi
  6696.  else
  6697.    # PORTME fill in a description of your system's linker (not GNU ld)
  6698. @@ -1141,10 +1231,12 @@
  6699.      ;;
  6700.  
  6701.    aix4*)
  6702. -    allow_undefined_flag=
  6703. +    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  6704. +    hardcode_libdir_separator=':'
  6705.      if test "$with_gcc" = yes; then
  6706. -      if strings `${CC} -print-prog-name=collect2` | \
  6707. -     grep resolve_lib_name >/dev/null
  6708. +      collect2name=`${CC} -print-prog-name=collect2`
  6709. +      if test -f "$collect2name" && \
  6710. +     strings "$collect2name" | grep resolve_lib_name >/dev/null
  6711.        then
  6712.      # We have reworked collect2
  6713.      hardcode_direct=yes
  6714. @@ -1151,19 +1243,25 @@
  6715.        else
  6716.      # We have old collect2
  6717.      hardcode_direct=unsupported
  6718. +    # It fails to find uninstalled libraries when the uninstalled
  6719. +    # path is not listed in the libpath.  Setting hardcode_minus_L
  6720. +    # to unsupported forces relinking
  6721. +    hardcode_minus_L=yes
  6722. +    hardcode_libdir_flag_spec='-L$libdir'
  6723. +    hardcode_libdir_separator=
  6724.        fi
  6725. -      archive_cmds='$CC -shared ${wl}-bnoentry -o $objdir/$soname $libobjs $deplibs $linkopts'
  6726. +      shared_flag='-shared'
  6727.      else
  6728. -      always_export_symbols=yes
  6729. -      archive_expsym_cmds='$CC -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry'
  6730. +      shared_flag='${wl}-bM:SRE'
  6731.        hardcode_direct=yes
  6732.      fi
  6733. -    hardcode_minus_L=yes
  6734. -    # Though LIBPATH variable hardcodes shlibpath into executable,
  6735. -    # it doesn't affect searching for -l* libraries; this confuses
  6736. -    # tests in mdemo.
  6737. -    hardcode_shlibpath_var=unsupported
  6738. -    hardcode_libdir_flag_spec='-L$libdir'
  6739. +    allow_undefined_flag=' ${wl}-berok'
  6740. +    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  6741. +    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  6742. +    case "$host_os" in aix4.[01]|aix4.[01].*)
  6743. +      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  6744. +      always_export_symbols=yes ;;
  6745. +    esac
  6746.     ;;
  6747.  
  6748.    amigaos*)
  6749. @@ -1170,6 +1268,8 @@
  6750.      archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  6751.      hardcode_libdir_flag_spec='-L$libdir'
  6752.      hardcode_minus_L=yes
  6753. +    # see comment about different semantics on the GNU ld section
  6754. +    ld_shlibs=no
  6755.      ;;
  6756.  
  6757.    cygwin* | mingw*)
  6758. @@ -1192,7 +1292,6 @@
  6759.  
  6760.    freebsd1*)
  6761.      ld_shlibs=no
  6762. -    can_build_shared=no
  6763.      ;;
  6764.  
  6765.    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  6766. @@ -1203,7 +1302,6 @@
  6767.      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  6768.      hardcode_libdir_flag_spec='-R$libdir'
  6769.      hardcode_direct=yes
  6770. -    hardcode_minus_L=no # verified on 2.2.6
  6771.      hardcode_shlibpath_var=no
  6772.      ;;
  6773.  
  6774. @@ -1220,31 +1318,27 @@
  6775.      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  6776.      hardcode_libdir_flag_spec='-R$libdir'
  6777.      hardcode_direct=yes
  6778. -    hardcode_minus_L=no
  6779.      hardcode_shlibpath_var=no
  6780.      ;;
  6781.  
  6782. -  hpux9*)
  6783. -    archive_cmds='$rm $objdir/$soname~$LD -b +s +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib'
  6784. -    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  6785. -    hardcode_direct=yes
  6786. -    hardcode_minus_L=yes
  6787. -    export_dynamic_flag_spec='${wl}-E'
  6788. -    ;;
  6789. -
  6790. -  hpux10* | hpux11*)
  6791. -    archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib $libobjs $deplibs $linkopts'
  6792. +  hpux9* | hpux10* | hpux11*)
  6793. +    case "$host_os" in
  6794. +    hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
  6795. +    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  6796. +    esac
  6797.      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  6798. +    hardcode_libdir_separator=:
  6799.      hardcode_direct=yes
  6800. -    hardcode_minus_L=yes
  6801. +    hardcode_minus_L=yes # Not in the search PATH, but as the default
  6802. +             # location of the library.
  6803.      export_dynamic_flag_spec='${wl}-E'
  6804.      ;;
  6805.  
  6806.    irix5* | irix6*)
  6807.      if test "$with_gcc" = yes; then
  6808. -      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  6809. +      archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  6810.      else
  6811. -      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  6812. +      archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  6813.      fi
  6814.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  6815.      hardcode_libdir_separator=:
  6816. @@ -1279,10 +1373,10 @@
  6817.    osf3* | osf4*)
  6818.      if test "$with_gcc" = yes; then
  6819.        allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  6820. -      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  6821. +      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  6822.      else
  6823.        allow_undefined_flag=' -expect_unresolved \*'
  6824. -      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
  6825. +      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  6826.      fi
  6827.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  6828.      hardcode_libdir_separator=:
  6829. @@ -1289,8 +1383,10 @@
  6830.      ;;
  6831.  
  6832.    sco3.2v5*)
  6833. -    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  6834. -    hardcode_direct=yes
  6835. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  6836. +    hardcode_shlibpath_var=no
  6837. +    runpath_var=LD_RUN_PATH
  6838. +    hardcode_runpath_var=yes
  6839.      ;;
  6840.  
  6841.    solaris*)
  6842. @@ -1302,16 +1398,15 @@
  6843.          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  6844.      hardcode_libdir_flag_spec='-R$libdir'
  6845.      hardcode_shlibpath_var=no
  6846. +    case "$host_os" in
  6847. +    solaris2.[0-5] | solaris2.[0-5].*) ;;
  6848. +    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  6849. +      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  6850. +    esac
  6851.      ;;
  6852.  
  6853.    sunos4*)
  6854. -    # Why do we need -Bstatic?  To avoid inter-library dependencies, maybe...
  6855. -    if test "$with_gcc" = yes; then
  6856. -      # Use -fPIC here because libgcc is multilibbed
  6857. -      archive_cmds='$CC -shared ${wl}-Bstatic -fPIC -o $lib $libobjs $deplibs $linkopts'
  6858. -    else
  6859. -      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  6860. -    fi
  6861. +    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  6862.      hardcode_libdir_flag_spec='-L$libdir'
  6863.      hardcode_direct=yes
  6864.      hardcode_minus_L=yes
  6865. @@ -1318,10 +1413,15 @@
  6866.      hardcode_shlibpath_var=no
  6867.      ;;
  6868.  
  6869. +  sysv4)
  6870. +    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  6871. +    runpath_var='LD_RUN_PATH'
  6872. +    hardcode_shlibpath_var=no
  6873. +    hardcode_direct=no #Motorola manual says yes, but my tests say they lie 
  6874. +    ;;  
  6875. +
  6876.    sysv4.3*)
  6877.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  6878. -    hardcode_direct=no
  6879. -    hardcode_minus_L=no
  6880.      hardcode_shlibpath_var=no
  6881.      export_dynamic_flag_spec='-Bexport'
  6882.      ;;
  6883. @@ -1329,8 +1429,6 @@
  6884.    uts4*)
  6885.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  6886.      hardcode_libdir_flag_spec='-L$libdir'
  6887. -    hardcode_direct=no
  6888. -    hardcode_minus_L=no
  6889.      hardcode_shlibpath_var=no
  6890.      ;;
  6891.  
  6892. @@ -1337,28 +1435,37 @@
  6893.    dgux*)
  6894.      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  6895.      hardcode_libdir_flag_spec='-L$libdir'
  6896. -    hardcode_direct=no
  6897. -    hardcode_minus_L=no
  6898. +    hardcode_shlibpath_var=no
  6899. +    ;;
  6900. +
  6901. +  sysv4*MP*)
  6902. +    if test -d /usr/nec ;then
  6903. +    # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
  6904. +    archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
  6905.      hardcode_shlibpath_var=no
  6906. +    runpath_var=LD_RUN_PATH
  6907. +    hardcode_runpath_var=yes
  6908. +    ld_shlibs=yes
  6909. +    fi
  6910.      ;;
  6911.  
  6912.    *)
  6913.      ld_shlibs=no
  6914. -    can_build_shared=no
  6915.      ;;
  6916.    esac
  6917.  fi
  6918.  echo "$ac_t$ld_shlibs" 1>&6
  6919. +test "$ld_shlibs" = no && can_build_shared=no
  6920.  
  6921.  if test -z "$NM"; then
  6922.    echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  6923.    case "$NM" in
  6924. -  /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
  6925. +  [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  6926.    *)
  6927.      IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  6928.      for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  6929.        test -z "$ac_dir" && ac_dir=.
  6930. -      if test -f $ac_dir/nm; then
  6931. +      if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  6932.      # Check to see if the nm accepts a BSD-compat flag.
  6933.      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  6934.      #   nm: unknown option "B" ignored
  6935. @@ -1416,6 +1523,9 @@
  6936.  solaris*)
  6937.    symcode='[BDT]'
  6938.    ;;
  6939. +sysv4)
  6940. +  symcode='[DFNSTU]'
  6941. +  ;;
  6942.  esac
  6943.  
  6944.  # If we're using GNU nm, then use its standard symbol codes.
  6945. @@ -1444,11 +1554,11 @@
  6946.  main(){nm_test_var='a';nm_test_func();return(0);}
  6947.  EOF
  6948.  
  6949. -  echo "$progname:1447: checking if global_symbol_pipe works" >&5
  6950. -  if { (eval echo $progname:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  6951. +  echo "$progname:1557: checking if global_symbol_pipe works" >&5
  6952. +  if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  6953.      # Now try to grab the symbols.
  6954.      nlist=conftest.nm
  6955. -    if { echo "$progname:1451: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  6956. +    if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  6957.  
  6958.        # Try sorting and uniquifying the output.
  6959.        if sort "$nlist" | uniq > "$nlist"T; then
  6960. @@ -1495,12 +1605,12 @@
  6961.  #endif
  6962.  EOF
  6963.        # Now try linking the two files.
  6964. -      mv conftest.$objext conftestm.$objext
  6965. +      mv conftest.$objext conftstm.$objext
  6966.        save_LIBS="$LIBS"
  6967.        save_CFLAGS="$CFLAGS"
  6968. -      LIBS="conftestm.$objext"
  6969. +      LIBS="conftstm.$objext"
  6970.        CFLAGS="$CFLAGS$no_builtin_flag"
  6971. -      if { (eval echo $progname:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6972. +      if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  6973.          pipe_works=yes
  6974.        else
  6975.          echo "$progname: failed program was:" >&5
  6976. @@ -1520,7 +1630,7 @@
  6977.      echo "$progname: failed program was:" >&5
  6978.      cat conftest.c >&5
  6979.    fi
  6980. -  $rm conftest*
  6981. +  $rm conftest* conftst*
  6982.  
  6983.    # Do not use the global_symbol_pipe unless it works.
  6984.    if test "$pipe_works" = yes; then
  6985. @@ -1529,7 +1639,11 @@
  6986.      global_symbol_pipe=
  6987.    fi
  6988.  done
  6989. -echo "$ac_t$pipe_works" 1>&6
  6990. +if test "$pipe_works" = yes; then
  6991. +  echo "${ac_t}ok" 1>&6
  6992. +else
  6993. +  echo "${ac_t}failed" 1>&6
  6994. +fi
  6995.  
  6996.  if test -z "$global_symbol_pipe"; then
  6997.    global_symbol_to_cdecl=
  6998. @@ -1542,10 +1656,12 @@
  6999.     test -n "$runpath_var"; then
  7000.  
  7001.    # We can hardcode non-existant directories.
  7002. -  if test "$hardcode_direct" != no && \
  7003. -     test "$hardcode_minus_L" != no && \
  7004. -     test "$hardcode_shlibpath_var" != no; then
  7005. -
  7006. +  if test "$hardcode_direct" != no &&
  7007. +     # If the only mechanism to avoid hardcoding is shlibpath_var, we
  7008. +     # have to relink, otherwise we might link with an installed library
  7009. +     # when we should be linking with a yet-to-be-installed one
  7010. +     ## test "$hardcode_shlibpath_var" != no &&
  7011. +     test "$hardcode_minus_L" != no; then
  7012.      # Linking always hardcodes the temporary library directory.
  7013.      hardcode_action=relink
  7014.    else
  7015. @@ -1628,6 +1744,10 @@
  7016.    library_names_spec='${libname}.so'
  7017.    dynamic_linker="$host_os ld.so"
  7018.    shlibpath_var=LIBRARY_PATH
  7019. +  deplibs_check_method=pass_all
  7020. +  lt_cv_dlopen="load_add_on"
  7021. +  lt_cv_dlopen_libs=
  7022. +  lt_cv_dlopen_self=yes
  7023.    ;;
  7024.  
  7025.  bsdi4*)
  7026. @@ -1634,7 +1754,7 @@
  7027.    version_type=linux
  7028.    library_names_spec='${libname}.so$major ${libname}.so'
  7029.    soname_spec='${libname}.so'
  7030. -  finish_cmds='PATH="$PATH:/sbin" ldconfig $libdir'
  7031. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  7032.    shlibpath_var=LD_LIBRARY_PATH
  7033.    deplibs_check_method='file_magic ELF 32-bit LSB shared object'
  7034.    file_magic_cmd=/usr/bin/file
  7035. @@ -1654,11 +1774,13 @@
  7036.      library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  7037.    fi
  7038.    dynamic_linker='Win32 ld.exe'
  7039. -  deplibs_check_method='file_magic file format pei*-i386.*architecture: i386'
  7040. -  file_magic_cmd='objdump -f'
  7041. +  deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  7042. +  file_magic_cmd='${OBJDUMP} -f'
  7043.    need_lib_prefix=no
  7044.    # FIXME: first we should search . and the directory the executable is in
  7045.    shlibpath_var=PATH
  7046. +  lt_cv_dlopen="LoadLibrary"
  7047. +  lt_cv_dlopen_libs=
  7048.    ;;
  7049.  
  7050.  freebsd1*)
  7051. @@ -1683,7 +1805,7 @@
  7052.        need_version=yes
  7053.        ;;
  7054.    esac
  7055. -  finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  7056. +  finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
  7057.    shlibpath_var=LD_LIBRARY_PATH
  7058.    ;;
  7059.  
  7060. @@ -1701,6 +1823,7 @@
  7061.    need_lib_prefix=no
  7062.    need_version=no
  7063.    shlibpath_var=SHLIB_PATH
  7064. +  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  7065.    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  7066.    soname_spec='${libname}${release}.sl$major'
  7067.    # HP-UX runs *really* slowly unless shared libraries are mode 555.
  7068. @@ -1707,40 +1830,36 @@
  7069.    postinstall_cmds='chmod 555 $lib'
  7070.    ;;
  7071.  
  7072. -irix5*)
  7073. -  version_type=irix
  7074. -  soname_spec='${libname}${release}.so'
  7075. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  7076. -  shlibpath_var=LD_LIBRARY_PATH
  7077. -  deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" # or should it be pass_all?
  7078. -  file_magic_cmd=/usr/bin/file
  7079. -  file_magic_test_file=`echo /lib/libc.so*`
  7080. -  shlibpath_overrides_runpath=no
  7081. -  ;;
  7082. -
  7083. -irix6*)
  7084. +irix5* | irix6*)
  7085.    version_type=irix
  7086.    need_lib_prefix=no
  7087.    need_version=no
  7088. -  soname_spec='${libname}${release}.so'
  7089. -  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  7090. -  case "$LD" in # libtool.m4 will add one of these switches to LD
  7091. -  *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  7092. -  *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  7093. -  *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  7094. -  *) libsuff= shlibsuff= libmagic=never-match;;
  7095. +  soname_spec='${libname}${release}.so.$major'
  7096. +  library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  7097. +  case "$host_os" in
  7098. +  irix5*)
  7099. +    libsuff= shlibsuff=
  7100. +    # this will be overridden with pass_all, but let us keep it just in case
  7101. +    deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  7102. +    ;;
  7103. +  *)
  7104. +    case "$LD" in # libtool.m4 will add one of these switches to LD
  7105. +    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  7106. +    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  7107. +    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  7108. +    *) libsuff= shlibsuff= libmagic=never-match;;
  7109. +    esac
  7110. +    # this will be overridden with pass_all, but let us keep it just in case
  7111. +    deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
  7112. +    ;;
  7113.    esac
  7114.    shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  7115.    shlibpath_overrides_runpath=no
  7116. -  # even though /usr/local/lib is always searched, the man-page says
  7117. -  # shared libraries should not be installed there if they use an ABI
  7118. -  # different from -32, so we'd better not search for shared libraries
  7119. -  # there either
  7120. -  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  7121. -  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
  7122. -  deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" # or should it be pass_all?
  7123. +  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  7124. +  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  7125.    file_magic_cmd=/usr/bin/file
  7126.    file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  7127. +  deplibs_check_method='pass_all'
  7128.    ;;
  7129.  
  7130.  # No shared lib support for Linux oldld, aout, or coff.
  7131. @@ -1755,7 +1874,7 @@
  7132.    need_version=no
  7133.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  7134.    soname_spec='${libname}${release}.so$major'
  7135. -  finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
  7136. +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  7137.    shlibpath_var=LD_LIBRARY_PATH
  7138.    shlibpath_overrides_runpath=no
  7139.    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  7140. @@ -1777,7 +1896,7 @@
  7141.    version_type=sunos
  7142.    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  7143.      library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  7144. -    finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
  7145. +    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  7146.      dynamic_linker='NetBSD (a.out) ld.so'
  7147.    else
  7148.      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  7149. @@ -1808,17 +1927,15 @@
  7150.  
  7151.  osf3* | osf4*)
  7152.    version_type=osf
  7153. +  need_version=no
  7154.    soname_spec='${libname}${release}.so'
  7155.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  7156.    shlibpath_var=LD_LIBRARY_PATH
  7157. -  # deplibs_check_method='pass_all'
  7158. -  # Although pass_all appears to work, it copies symbols from static libraries
  7159. -  # into shared ones and exports them.  So, when a program is linked with two
  7160. -  # or more libraries that have got copies of the same symbols, link fails
  7161. -  # This was only tested on osf4:
  7162. +  # this will be overridden with pass_all, but let us keep it just in case
  7163.    deplibs_check_method='file_magic COFF format alpha shared library'
  7164.    file_magic_cmd=/usr/bin/file
  7165.    file_magic_test_file=/shlib/libc.so
  7166. +  deplibs_check_method='pass_all'
  7167.    sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  7168.    sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  7169.    ;;
  7170. @@ -1857,7 +1974,7 @@
  7171.    need_version=yes
  7172.    ;;
  7173.  
  7174. -sysv4.2uw2* | sysv4.3* | sysv5*)
  7175. +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  7176.    version_type=linux
  7177.    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  7178.    soname_spec='${libname}${release}.so$major'
  7179. @@ -1866,6 +1983,15 @@
  7180.      ncr)
  7181.        deplibs_check_method='pass_all'
  7182.        ;;
  7183. +    motorola)
  7184. +      need_lib_prefix=no
  7185. +      need_version=no
  7186. +      shlibpath_overrides_runpath=no
  7187. +      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  7188. +      deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
  7189. +      file_magic_cmd=/usr/bin/file
  7190. +      file_magic_test_file=`echo /usr/lib/libc.so*`
  7191. +      ;;
  7192.    esac
  7193.    ;;
  7194.  
  7195. @@ -1885,6 +2011,15 @@
  7196.    shlibpath_var=LD_LIBRARY_PATH
  7197.    ;;
  7198.  
  7199. +sysv4*MP*)
  7200. +  if test -d /usr/nec ;then
  7201. +    version_type=linux
  7202. +    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  7203. +    soname_spec='$libname.so.$major'
  7204. +    shlibpath_var=LD_LIBRARY_PATH
  7205. +  fi
  7206. +  ;;
  7207. +
  7208.  *)
  7209.    dynamic_linker=no
  7210.    ;;
  7211. @@ -1895,6 +2030,17 @@
  7212.  # Report the final consequences.
  7213.  echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  7214.  
  7215. +# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  7216. +# configure.in, otherwise build static only libraries.
  7217. +case "$host_os" in
  7218. +cygwin* | mingw* | os2*)
  7219. +  if test x$can_build_shared = xyes; then
  7220. +    test x$enable_win32_dll = xno && can_build_shared=no
  7221. +    echo "checking if package supports dlls... $can_build_shared" 1>&6
  7222. +  fi
  7223. +;;
  7224. +esac
  7225. +
  7226.  if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
  7227.    case "$deplibs_check_method" in
  7228.    "file_magic "*)
  7229. @@ -1973,16 +2119,16 @@
  7230.  else
  7231.  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  7232.    lt_cv_dlopen=no lt_cv_dlopen_libs=
  7233. -echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  7234. -echo "$progname:1977: checking for dlopen" >&5
  7235. -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  7236. +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  7237. +echo "$progname:2123: checking for dlopen in -ldl" >&5
  7238. +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  7239. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  7240.    echo $ac_n "(cached) $ac_c" 1>&6
  7241.  else
  7242. -  cat > conftest.$ac_ext <<EOF
  7243. -#line 1982 "ltconfig"
  7244. -/* System header to define __stub macros and hopefully few prototypes,
  7245. -    which can conflict with char dlopen(); below.  */
  7246. -#include <assert.h>
  7247. +  ac_save_LIBS="$LIBS"
  7248. +LIBS="-ldl  $LIBS"
  7249. +cat > conftest.$ac_ext <<EOF
  7250. +#line 2131 "ltconfig"
  7251.  /* Override any gcc2 internal prototype to avoid an error.  */
  7252.  /* We use char because int might match the return type of a gcc2
  7253.      builtin and then its argument prototype would still apply.  */
  7254. @@ -1989,45 +2135,37 @@
  7255.  char dlopen();
  7256.  
  7257.  int main() {
  7258. -
  7259. -/* The GNU C library defines this for functions which it implements
  7260. -    to always fail with ENOSYS.  Some functions are actually named
  7261. -    something starting with __ and the normal name is an alias.  */
  7262. -#if defined (__stub_dlopen) || defined (__stub___dlopen)
  7263. -choke me
  7264. -#else
  7265. -dlopen();
  7266. -#endif
  7267. -
  7268. +dlopen()
  7269.  ; return 0; }
  7270.  EOF
  7271. -if { (eval echo $progname:2004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7272. +if { (eval echo $progname:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7273.    rm -rf conftest*
  7274. -  eval "ac_cv_func_dlopen=yes"
  7275. +  eval "ac_cv_lib_$ac_lib_var=yes"
  7276.  else
  7277.    echo "$progname: failed program was:" >&5
  7278.    cat conftest.$ac_ext >&5
  7279.    rm -rf conftest*
  7280. -  eval "ac_cv_func_dlopen=no"
  7281. +  eval "ac_cv_lib_$ac_lib_var=no"
  7282.  fi
  7283.  rm -f conftest*
  7284. -fi
  7285. +LIBS="$ac_save_LIBS"
  7286.  
  7287. -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  7288. +fi
  7289. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7290.    echo "$ac_t""yes" 1>&6
  7291. -  lt_cv_dlopen="dlopen"
  7292. +  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  7293.  else
  7294.    echo "$ac_t""no" 1>&6
  7295. -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  7296. -echo "$progname:2022: checking for dlopen in -ldl" >&5
  7297. -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  7298. -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  7299. +echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  7300. +echo "$progname:2160: checking for dlopen" >&5
  7301. +if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  7302.    echo $ac_n "(cached) $ac_c" 1>&6
  7303.  else
  7304. -  ac_save_LIBS="$LIBS"
  7305. -LIBS="-ldl  $LIBS"
  7306. -cat > conftest.$ac_ext <<EOF
  7307. -#line 2030 "ltconfig"
  7308. +  cat > conftest.$ac_ext <<EOF
  7309. +#line 2165 "ltconfig"
  7310. +/* System header to define __stub macros and hopefully few prototypes,
  7311. +    which can conflict with char dlopen(); below.  */
  7312. +#include <assert.h>
  7313.  /* Override any gcc2 internal prototype to avoid an error.  */
  7314.  /* We use char because int might match the return type of a gcc2
  7315.      builtin and then its argument prototype would still apply.  */
  7316. @@ -2034,29 +2172,36 @@
  7317.  char dlopen();
  7318.  
  7319.  int main() {
  7320. -dlopen()
  7321. +
  7322. +/* The GNU C library defines this for functions which it implements
  7323. +    to always fail with ENOSYS.  Some functions are actually named
  7324. +    something starting with __ and the normal name is an alias.  */
  7325. +#if defined (__stub_dlopen) || defined (__stub___dlopen)
  7326. +choke me
  7327. +#else
  7328. +dlopen();
  7329. +#endif
  7330. +
  7331.  ; return 0; }
  7332.  EOF
  7333. -if { (eval echo $progname:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7334. +if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7335.    rm -rf conftest*
  7336. -  eval "ac_cv_lib_$ac_lib_var=yes"
  7337. +  eval "ac_cv_func_dlopen=yes"
  7338.  else
  7339.    echo "$progname: failed program was:" >&5
  7340.    cat conftest.$ac_ext >&5
  7341.    rm -rf conftest*
  7342. -  eval "ac_cv_lib_$ac_lib_var=no"
  7343. +  eval "ac_cv_func_dlopen=no"
  7344.  fi
  7345.  rm -f conftest*
  7346. -LIBS="$ac_save_LIBS"
  7347. -
  7348.  fi
  7349. -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7350. +if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  7351.    echo "$ac_t""yes" 1>&6
  7352. -  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  7353. +  lt_cv_dlopen="dlopen"
  7354.  else
  7355.    echo "$ac_t""no" 1>&6
  7356.  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  7357. -echo "$progname:2059: checking for dld_link in -ldld" >&5
  7358. +echo "$progname:2204: checking for dld_link in -ldld" >&5
  7359.  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  7360.  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  7361.    echo $ac_n "(cached) $ac_c" 1>&6
  7362. @@ -2064,7 +2209,7 @@
  7363.    ac_save_LIBS="$LIBS"
  7364.  LIBS="-ldld  $LIBS"
  7365.  cat > conftest.$ac_ext <<EOF
  7366. -#line 2067 "ltconfig"
  7367. +#line 2212 "ltconfig"
  7368.  /* Override any gcc2 internal prototype to avoid an error.  */
  7369.  /* We use char because int might match the return type of a gcc2
  7370.      builtin and then its argument prototype would still apply.  */
  7371. @@ -2074,7 +2219,7 @@
  7372.  dld_link()
  7373.  ; return 0; }
  7374.  EOF
  7375. -if { (eval echo $progname:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7376. +if { (eval echo $progname:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7377.    rm -rf conftest*
  7378.    eval "ac_cv_lib_$ac_lib_var=yes"
  7379.  else
  7380. @@ -2093,12 +2238,12 @@
  7381.  else
  7382.    echo "$ac_t""no" 1>&6
  7383.  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  7384. -echo "$progname:2096: checking for shl_load" >&5
  7385. +echo "$progname:2241: checking for shl_load" >&5
  7386.  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  7387.    echo $ac_n "(cached) $ac_c" 1>&6
  7388.  else
  7389.    cat > conftest.$ac_ext <<EOF
  7390. -#line 2101 "ltconfig"
  7391. +#line 2246 "ltconfig"
  7392.  /* System header to define __stub macros and hopefully few prototypes,
  7393.      which can conflict with char shl_load(); below.  */
  7394.  #include <assert.h>
  7395. @@ -2120,7 +2265,7 @@
  7396.  
  7397.  ; return 0; }
  7398.  EOF
  7399. -if { (eval echo $progname:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7400. +if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7401.    rm -rf conftest*
  7402.    eval "ac_cv_func_shl_load=yes"
  7403.  else
  7404. @@ -2137,54 +2282,47 @@
  7405.    lt_cv_dlopen="shl_load"
  7406.  else
  7407.    echo "$ac_t""no" 1>&6
  7408. -echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
  7409. -echo "$progname:2141: checking for LoadLibrary" >&5
  7410. -if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
  7411. +echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  7412. +echo "$progname:2286: checking for shl_load in -ldld" >&5
  7413. +ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  7414. +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  7415.    echo $ac_n "(cached) $ac_c" 1>&6
  7416.  else
  7417. -  cat > conftest.$ac_ext <<EOF
  7418. -#line 2146 "ltconfig"
  7419. -/* System header to define __stub macros and hopefully few prototypes,
  7420. -    which can conflict with char LoadLibrary(); below.  */
  7421. -#include <assert.h>
  7422. +  ac_save_LIBS="$LIBS"
  7423. +LIBS="-ldld  $LIBS"
  7424. +cat > conftest.$ac_ext <<EOF
  7425. +#line 2294 "ltconfig"
  7426. +#include "confdefs.h"
  7427.  /* Override any gcc2 internal prototype to avoid an error.  */
  7428.  /* We use char because int might match the return type of a gcc2
  7429.      builtin and then its argument prototype would still apply.  */
  7430. -char LoadLibrary();
  7431. +char shl_load();
  7432.  
  7433.  int main() {
  7434. -
  7435. -/* The GNU C library defines this for functions which it implements
  7436. -    to always fail with ENOSYS.  Some functions are actually named
  7437. -    something starting with __ and the normal name is an alias.  */
  7438. -#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
  7439. -choke me
  7440. -#else
  7441. -LoadLibrary();
  7442. -#endif
  7443. -
  7444. +shl_load()
  7445.  ; return 0; }
  7446.  EOF
  7447. -if { (eval echo $progname:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7448. +if { (eval echo $progname:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  7449.    rm -rf conftest*
  7450. -  eval "ac_cv_func_LoadLibrary=yes"
  7451. +  eval "ac_cv_lib_$ac_lib_var=yes"
  7452.  else
  7453.    echo "$progname: failed program was:" >&5
  7454.    cat conftest.$ac_ext >&5
  7455.    rm -rf conftest*
  7456. -  eval "ac_cv_func_LoadLibrary=no"
  7457. +  eval "ac_cv_lib_$ac_lib_var=no"
  7458.  fi
  7459.  rm -f conftest*
  7460. -fi
  7461. +LIBS="$ac_save_LIBS"
  7462.  
  7463. -if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
  7464. +fi
  7465. +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  7466.    echo "$ac_t""yes" 1>&6
  7467. -  lt_cv_dlopen="LoadLibrary"
  7468. +  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  7469.  else
  7470.    echo "$ac_t""no" 1>&6
  7471.  fi
  7472.  
  7473. -      
  7474. +
  7475.  fi
  7476.  
  7477.      
  7478. @@ -2207,17 +2345,17 @@
  7479.  for ac_hdr in dlfcn.h; do
  7480.  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  7481.  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  7482. -echo "$progname:2210: checking for $ac_hdr" >&5
  7483. +echo "$progname:2348: checking for $ac_hdr" >&5
  7484.  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  7485.    echo $ac_n "(cached) $ac_c" 1>&6
  7486.  else
  7487.    cat > conftest.$ac_ext <<EOF
  7488. -#line 2215 "ltconfig"
  7489. +#line 2353 "ltconfig"
  7490.  #include <$ac_hdr>
  7491.  int fnord = 0;
  7492.  EOF
  7493.  ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
  7494. -{ (eval echo $progname:2220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7495. +{ (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  7496.  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  7497.  if test -z "$ac_err"; then
  7498.    rm -rf conftest*
  7499. @@ -2245,7 +2383,7 @@
  7500.      LIBS="$lt_cv_dlopen_libs $LIBS"
  7501.  
  7502.    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  7503. -echo "$progname:2248: checking whether a program can dlopen itself" >&5
  7504. +echo "$progname:2386: checking whether a program can dlopen itself" >&5
  7505.  if test "${lt_cv_dlopen_self+set}" = set; then
  7506.    echo $ac_n "(cached) $ac_c" 1>&6
  7507.  else
  7508. @@ -2253,7 +2391,7 @@
  7509.      lt_cv_dlopen_self=cross
  7510.    else
  7511.      cat > conftest.c <<EOF
  7512. -#line 2256 "ltconfig"
  7513. +#line 2394 "ltconfig"
  7514.  
  7515.  #if HAVE_DLFCN_H
  7516.  #include <dlfcn.h>
  7517. @@ -2299,7 +2437,7 @@
  7518.             if(ptr1 || ptr2) exit(0); } exit(1); } 
  7519.  
  7520.  EOF
  7521. -if { (eval echo $progname:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  7522. +if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  7523.  then
  7524.    lt_cv_dlopen_self=yes
  7525.  else
  7526. @@ -2318,7 +2456,7 @@
  7527.    if test "$lt_cv_dlopen_self" = yes; then
  7528.      LDFLAGS="$LDFLAGS $link_static_flag"
  7529.    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  7530. -echo "$progname:2321: checking whether a statically linked program can dlopen itself" >&5
  7531. +echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5
  7532.  if test "${lt_cv_dlopen_self_static+set}" = set; then
  7533.    echo $ac_n "(cached) $ac_c" 1>&6
  7534.  else
  7535. @@ -2326,7 +2464,7 @@
  7536.      lt_cv_dlopen_self_static=cross
  7537.    else
  7538.      cat > conftest.c <<EOF
  7539. -#line 2329 "ltconfig"
  7540. +#line 2467 "ltconfig"
  7541.  
  7542.  #if HAVE_DLFCN_H
  7543.  #include <dlfcn.h>
  7544. @@ -2372,7 +2510,7 @@
  7545.      if(ptr1 || ptr2) exit(0); } exit(1); } 
  7546.  
  7547.  EOF
  7548. -if { (eval echo $progname:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  7549. +if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  7550.  then
  7551.    lt_cv_dlopen_self_static=yes
  7552.  else
  7553. @@ -2416,8 +2554,10 @@
  7554.  case "$ltmain" in
  7555.  *.sh)
  7556.    # Now quote all the things that may contain metacharacters.
  7557. -  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  7558. -    old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  7559. +  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
  7560. +    old_LD old_LDFLAGS old_LIBS \
  7561. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
  7562. +    AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  7563.      reload_flag reload_cmds wl \
  7564.      pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  7565.      thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  7566. @@ -2497,8 +2637,9 @@
  7567.  
  7568.  *)
  7569.    # Double-quote the variables that need it (for aesthetics).
  7570. -  for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
  7571. -    old_LN_S old_DLLTOOL old_AS; do
  7572. +  for var in old_CC old_CFLAGS old_CPPFLAGS \
  7573. +    old_LD old_LDFLAGS old_LIBS \
  7574. +    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
  7575.      eval "$var=\\\"\$var\\\""
  7576.    done
  7577.  
  7578. @@ -2518,8 +2659,9 @@
  7579.  # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  7580.  #
  7581.  # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  7582. -# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  7583. -# DLLTOOL="$old_DLLTOOL" AS="$old_AS" \\
  7584. +# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  7585. +# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  7586. +# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
  7587.  #   $0$ltconfig_args
  7588.  #
  7589.  # Compiler and other test output produced by $progname, useful for
  7590. @@ -2565,6 +2707,9 @@
  7591.  # Used on cygwin: DLL creation program.
  7592.  DLLTOOL="$DLLTOOL"
  7593.  
  7594. +# Used on cygwin: object dumper.
  7595. +OBJDUMP="$OBJDUMP"
  7596. +
  7597.  # Used on cygwin: assembler.
  7598.  AS="$AS"
  7599.  
  7600. @@ -2587,7 +2732,7 @@
  7601.  # Additional compiler flags for building library objects.
  7602.  pic_flag=$pic_flag
  7603.  
  7604. -# Does compiler simultaneously support -c and -o options
  7605. +# Does compiler simultaneously support -c and -o options?
  7606.  compiler_c_o=$compiler_c_o
  7607.  
  7608.  # Can we write directly to a .lo ?
  7609. @@ -2657,7 +2802,7 @@
  7610.  # Method to check whether dependent libraries are shared objects.
  7611.  deplibs_check_method=$deplibs_check_method
  7612.  
  7613. -# Command to use when deplibs_check_method == file_magic
  7614. +# Command to use when deplibs_check_method == file_magic.
  7615.  file_magic_cmd=$file_magic_cmd
  7616.  
  7617.  # Flag that allows shared libraries with undefined symbols to be built.
  7618. @@ -2718,16 +2863,16 @@
  7619.  # Fix the shell variable \$srcfile for the compiler.
  7620.  fix_srcfile_path="$fix_srcfile_path"
  7621.  
  7622. -# Set to yes if exported symbols are required
  7623. +# Set to yes if exported symbols are required.
  7624.  always_export_symbols=$always_export_symbols
  7625.  
  7626. -# The command to extract exported symbols
  7627. +# The commands to list exported symbols.
  7628.  export_symbols_cmds=$export_symbols_cmds
  7629.  
  7630. -# Symbols that should not be listed in the preloaded symbols
  7631. +# Symbols that should not be listed in the preloaded symbols.
  7632.  exclude_expsyms=$exclude_expsyms
  7633.  
  7634. -# Symbols that must always be exported
  7635. +# Symbols that must always be exported.
  7636.  include_expsyms=$include_expsyms
  7637.  
  7638.  EOF
  7639. --- ./configure    Tue Jul  6 14:36:42 1999
  7640. +++ ../ORBit-0.4.91/./configure    Tue Jul  6 18:27:54 1999
  7641. @@ -4968,7 +4968,6 @@
  7642.  src/IIOP/Makefile
  7643.  src/orb/orbit.h
  7644.  src/orb/Makefile
  7645. -src/idl-compiler/Makefile
  7646.  src/orbit-idl-compiler/Makefile
  7647.  src/orbit-idl-compiler/backends/Makefile
  7648.  src/orbit-idl-compiler/backends/c/Makefile
  7649. @@ -5119,7 +5118,6 @@
  7650.  src/IIOP/Makefile
  7651.  src/orb/orbit.h
  7652.  src/orb/Makefile
  7653. -src/idl-compiler/Makefile
  7654.  src/orbit-idl-compiler/Makefile
  7655.  src/orbit-idl-compiler/backends/Makefile
  7656.  src/orbit-idl-compiler/backends/c/Makefile
  7657.